From 4427c91ab412bed17d23cda182fed88783815cfe Mon Sep 17 00:00:00 2001 From: Davis King Date: Fri, 18 Mar 2011 13:42:31 +0000 Subject: [PATCH] updated docs --HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404173 --- docs/docs/ml.xml | 19 ++++++++++++++++++- docs/docs/term_index.xml | 1 + 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/docs/ml.xml b/docs/docs/ml.xml index 2ad4f4ed0..7654a5790 100644 --- a/docs/docs/ml.xml +++ b/docs/docs/ml.xml @@ -184,6 +184,7 @@ Davis E. King. load_libsvm_formatted_data save_libsvm_formatted_data sparse_to_dense + fix_nonzero_indexing
@@ -1529,7 +1530,10 @@ Davis E. King. sparse vectors. If you want to load data into dense vectors (i.e. dlib::matrix objects) then you can use the sparse_to_dense - function to perform the conversion. + function to perform the conversion. Also, some LIBSVM formatted files number + their features beginning with 1 rather than 0. If this bothers you, then you + can fix it by using the fix_nonzero_indexing function + on the data after it is loaded. @@ -1560,6 +1564,19 @@ Davis E. King. + + + + fix_nonzero_indexing + dlib/data_io.h + dlib/data_io/libsvm_io_abstract.h + + This is a simple function that takes a std::vector of + sparse vectors + and makes sure they are zero-indexed (e.g. makes sure the first index value is zero). + + + diff --git a/docs/docs/term_index.xml b/docs/docs/term_index.xml index 82d9d5a93..f7e710753 100644 --- a/docs/docs/term_index.xml +++ b/docs/docs/term_index.xml @@ -141,6 +141,7 @@ +