Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'clean-docs' of git://github.com/shelhamer/shogun
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Mar 25, 2012
2 parents 46a716f + 1ae5a25 commit f8c2851
Show file tree
Hide file tree
Showing 11 changed files with 188 additions and 155 deletions.
17 changes: 9 additions & 8 deletions doc/pages/DeveloperTutorial.mainpage
Expand Up @@ -108,7 +108,8 @@ CSimpleKernel<float64_t> (for strings it would be CStringKernel, for sparse
features CSparseKernel).

Essentially we only need to overload the CKernel::compute() function with our
own implementation of compute. All the rest gets empty defaults. An example for our compute() function could be
own implementation of compute. All the rest gets empty defaults. An example for
our compute() function could be


\verbatim
Expand All @@ -117,7 +118,7 @@ virtual float64_t compute(int32_t idx_a, int32_t idx_b)
int32_t alen, blen;
bool afree, bfree;

float64_t* avec=
float64_t* avec=
((CSimpleFeatures<float64_t>*) lhs)->get_feature_vector(idx_a, alen, afree);
float64_t* bvec=
((CSimpleFeatures<float64_t>*) rhs)->get_feature_vector(idx_b, blen, bfree);
Expand Down Expand Up @@ -183,11 +184,11 @@ and finally tell swig to wrap all functions found in the header
\endverbatim

In case you got your object working we will happily integrate it into shogun
provided you follow a number of basic coding conventions detailed in \subpage devel (see
FORMATTING for formatting instructions, MACROS on how to use and name macros,
TYPES on which types to use, FUNCTIONS on how functions should look like and
NAMING CONVENTIONS for the naming scheme. Note that in case you change the API
in a way that breaks ABI compatibility you need to increase the major number of
the libshogun soname (see \subpage soname ).
provided you follow a number of basic coding conventions detailed in \subpage
devel (see FORMATTING for formatting instructions, MACROS on how to use and name
macros, TYPES on which types to use, FUNCTIONS on how functions should look like
and NAMING CONVENTIONS for the naming scheme. Note that in case you change the
API in a way that breaks ABI compatibility you need to increase the major number
of the libshogun soname (see \subpage soname ).

*/
2 changes: 1 addition & 1 deletion doc/pages/Documentation.mainpage
Expand Up @@ -25,7 +25,7 @@
Perceptrons and features algorithms to train hidden markov models. The input
feature-objects can be dense, sparse or strings and of type
int/short/double/char and can be converted into different feature types.
Chains of preprocessors (e.g. substracting the mean) can be attached to each
Chains of preprocessors (e.g. subtracting the mean) can be attached to each
feature object allowing for on-the-fly pre-processing.

SHOGUN is implemented in C++ and interfaces to Matlab(tm), R, Octave and
Expand Down
9 changes: 5 additions & 4 deletions doc/pages/EierlegendeWollmilchSauInterface.mainpage
Expand Up @@ -2,9 +2,9 @@

As mentioned before SHOGUN interfaces to several programming languages and
toolkits such as Matlab(tm), R, Python, Octave. The special
Eierlegendewollmilchsau (elwms) interface does everything in one file. It is
a chimera of all the \subpage staticinterfaces, thus all the examples and documentation
form \subpage staticinterfaces still apply.
Eierlegendewollmilchsau (elwms) interface does everything in one file. It is a
chimera of all the \subpage staticinterfaces, thus all the examples and
documentation form \subpage staticinterfaces still apply.

One of the key strengths of this interface is that it provides the
\verbatim
Expand All @@ -13,7 +13,8 @@ elwms('run_r', 'A', A, ..., 'rfile', '...')
elwms('run_octave', 'A', A, ..., octavecode, '...')
\endverbatim

interoperability commands that enable running of code in foreign languages. For example
interoperability commands that enable running of code in foreign languages. For
example

\verbinclude octave_matplotlib.m

Expand Down
38 changes: 20 additions & 18 deletions doc/pages/ExamplesLibshogun.mainpage
Expand Up @@ -2,28 +2,29 @@

This page lists ready to run shogun examples for the C++ libshogun interface.

\li \subpage libshogun_base_examples
\li \subpage libshogun_basic_examples
\li \subpage libshogun_classifier_examples
\li \subpage libshogun_clustering_examples
\li \subpage libshogun_converter_examples
\li \subpage libshogun_features_examples
\li \subpage libshogun_kernel_examples
\li \subpage libshogun_library_examples
\li \subpage libshogun_mathematics_examples
\li \subpage libshogun_modelselection_examples
\li \subpage libshogun_parameter_examples
\li \subpage libshogun_preprocessor_examples
\li \subpage libshogun_serialization_examples
\li \subpage libshogun_splitting_examples
\li \subpage libshogun_streaming_examples
\li \subpage libshogun_base_examples
\li \subpage libshogun_basic_examples
\li \subpage libshogun_classifier_examples
\li \subpage libshogun_clustering_examples
\li \subpage libshogun_converter_examples
\li \subpage libshogun_features_examples
\li \subpage libshogun_kernel_examples
\li \subpage libshogun_library_examples
\li \subpage libshogun_mathematics_examples
\li \subpage libshogun_modelselection_examples
\li \subpage libshogun_parameter_examples
\li \subpage libshogun_preprocessor_examples
\li \subpage libshogun_serialization_examples
\li \subpage libshogun_splitting_examples
\li \subpage libshogun_streaming_examples

To run the examples you will need to manually compile them via
\verbatim
g++ name_of_example.cpp -lshogun
\endverbatim

in case you installed libshogun to a nonstandard directory you will need to specify the appropriate library and include paths, e.g.
in case you installed libshogun to a nonstandard directory you will need to
specify the appropriate library and include paths, e.g.
\verbatim
g++ -I/path/to/libshogun/includes name_of_example.cpp -L/path/to/libshogun/sofile -lshogun
\endverbatim
Expand All @@ -32,11 +33,12 @@ Then the examples are standard binary executables and can be started via
\verbatim
./name_of_example
\endverbatim
respectively if the libraries are in nonstandard locations (such that they cannot be found by the dynamic linker)
respectively if the libraries are in nonstandard locations (such that they
cannot be found by the dynamic linker)
\verbatim
LD_LIBRARY_PATH=path/to/libshogun ./name_of_example
\endverbatim

\section libshogun_base_examples Base


Expand Down
38 changes: 21 additions & 17 deletions doc/pages/ExamplesStaticOctave.mainpage
@@ -1,18 +1,19 @@
/*! \page octave_static_examples Examples for Static Matlab(tm) and Octave Interface

This page lists ready to run shogun examples for the Static Matlab(tm) and Octave interface.

\li \subpage octave_static_classifier_examples
\li \subpage octave_static_clustering_examples
\li \subpage octave_static_distance_examples
\li \subpage octave_static_distribution_examples
\li \subpage octave_static_features_examples
\li \subpage octave_static_kernel_examples
\li \subpage octave_static_misc_examples
\li \subpage octave_static_mkl_examples
\li \subpage octave_static_preproc_examples
\li \subpage octave_static_regression_examples
\li \subpage octave_static_structure_examples
This page lists ready to run shogun examples for the Static Matlab(tm) and
Octave interface.

\li \subpage octave_static_classifier_examples
\li \subpage octave_static_clustering_examples
\li \subpage octave_static_distance_examples
\li \subpage octave_static_distribution_examples
\li \subpage octave_static_features_examples
\li \subpage octave_static_kernel_examples
\li \subpage octave_static_misc_examples
\li \subpage octave_static_mkl_examples
\li \subpage octave_static_preproc_examples
\li \subpage octave_static_regression_examples
\li \subpage octave_static_structure_examples

To run the examples issue
\verbatim
Expand All @@ -24,8 +25,9 @@ or start up matlab or octave and then type
name_of_example
\endverbatim

Note that you have to make sure that the sg.oct or sg.mexglx (name varies with architecture)
has to be in the matlab/octave path. This can be achieved using the addpath command:
Note that you have to make sure that the sg.oct or sg.mexglx (name varies with
architecture) has to be in the matlab/octave path. This can be achieved using
the addpath command:
\verbatim
addpath /path/to/octave
\endverbatim
Expand All @@ -34,13 +36,15 @@ respectively
addpath /path/to/matlab
\endverbatim

Finally note that for non-root installations you will have to make sure that libshogun and libshogun ui can be found by the dynamic linker, e.g. you will need to set:
Finally note that for non-root installations you will have to make sure that
libshogun and libshogun ui can be found by the dynamic linker, e.g. you will
need to set:

\verbatim
LD_LIBRARY_PATH=path/to/libshogun:path/to/libshogunui
\endverbatim
before starting matlab.

\section octave_static_classifier_examples Classifier


Expand Down
44 changes: 22 additions & 22 deletions doc/pages/FAQ.mainpage
Expand Up @@ -2,16 +2,16 @@
\page faq Frequently Asked Questions

\li Q: I am puzzled, shogun interfaces to so many languages but which language
and shogun interface should I use?
A: That depends a lot on your taste. I personally consider the modular
interfaces (python_modular, octave_modular) to be "best". Here best means very
flexible and easily extensible. However, in case you just want to train a single
SVM with a single or multiple kernels all of the static interfaces are
sufficient. And well, of course you should be using \b python http://www.python.org :-)
and shogun interface should I use? A: That depends a lot on your taste. I
personally consider the modular interfaces (python_modular, octave_modular) to
be "best". Here best means very flexible and easily extensible. However, in case
you just want to train a single SVM with a single or multiple kernels all of the
static interfaces are sufficient. And well, of course you should be using \b
python http://www.python.org :-)

\li Q: I've found a bug, where should I report it?
A: Either report it in our bug tracker http://trac.tuebingen.mpg.de/shogun or
ask on the mailinglist.
\li Q: I've found a bug, where should I report it? A: Either report it in our
bug tracker https://github.com/shogun-toolbox/shogun/issues or ask on the
mailinglist.

\li Q:Do I need CPLEX to use multiple kernel learning?
A: No, as of version 0.7.0 you won't need cplex if you want to learn the weights
Expand All @@ -21,11 +21,11 @@ multiple kernel learning (MKL) the GNU Linear Programming Kit (GLPK) version at
least 4.29 or CPLEX is required. For general p-norm MKL with p>1 it will work
nonetheless.

\li Q: Is it multiple kernel learning when I use many kernels?
A: No, a plain combination of features/kernels will remain a plain
concatenation. Only in case you learn the kernel weights you really do MKL. In
the static interfaces you can issue \verbatim [W]=sg('get_subkernel_weights') \endverbatim
and check whether all weights W are still 1.0.
\li Q: Is it multiple kernel learning when I use many kernels? A: No, a plain
combination of features/kernels will remain a plain concatenation. Only in case
you learn the kernel weights you really do MKL. In the static interfaces you can
issue \verbatim [W]=sg('get_subkernel_weights') \endverbatim and check whether
all weights W are still 1.0.

\li Q:Does shogun compile under windows?
A: Yes! With cygwin 1.7.1 the cmdline, python, python_modular and octave
Expand All @@ -42,12 +42,12 @@ to install (etc.). A plain ./configure;make;make install will fail since
repeated slashes (e.g., '//usr/local') in cygwin are problematic but in posix
systems simply ignored.

\li Q:How does shogun do its memory management?
A: As does python, we use reference counting internally, i.e. objects holding a
reference to another object should increase the reference count of the object
they are referencing and decrease the counter when they finished using the
object. It should be noted that loops (e.g., object A holding a reference to object B
and vice versa) are not detecting and may thus create memory leaks. However,
this scenario can so far be easily avoided - just don't create a combined
kernel that contains itself as a subkernel ;-)
\li Q:How does shogun do its memory management? A: As does python, we use
reference counting internally, i.e. objects holding a reference to another
object should increase the reference count of the object they are referencing
and decrease the counter when they finished using the object. It should be noted
that loops (e.g., object A holding a reference to object B and vice versa) are
not detecting and may thus create memory leaks. However, this scenario can so
far be easily avoided - just don't create a combined kernel that contains itself
as a subkernel ;-)
*/
2 changes: 1 addition & 1 deletion doc/pages/Installation.mainpage
Expand Up @@ -139,7 +139,7 @@ will autodetect and configure for the available interfaces.

Call
\verbatim./configure --help \endverbatim
to see the list of additional options detailled below.
to see the list of additional options detailed below.
\verbinclude Configure.generated

If this does not work for you, consult the INSTALL file for platform specific
Expand Down
23 changes: 12 additions & 11 deletions doc/pages/Methods.mainpage
Expand Up @@ -8,11 +8,11 @@
ML related Algorithms/Classes/Methods implemented within shogun.

\section featrep_sec Feature Representations
Shogun supports a wide range of feature representations. Among them are the so called
simple features (cf., CSimpleFeatures) that are standard 2-d Matrices, strings
(cf., CStringFeatures) that however in contrast to other meanings of string are
just a list of vectors of arbitrary length and sparse features (cf.,
CSparseFeatures) to efficiently represent sparse matrices.
Shogun supports a wide range of feature representations. Among them are the so
called simple features (cf., CSimpleFeatures) that are standard 2-d Matrices,
strings (cf., CStringFeatures) that however in contrast to other meanings of
string are just a list of vectors of arbitrary length and sparse features
(cf., CSparseFeatures) to efficiently represent sparse matrices.

Each of these feature objects

Expand All @@ -37,9 +37,9 @@
Many other feature types available. Some of them are based on the three basic
feature types above, like CTOPFeatures (TOP Kernel features from CHMM),
CFKFeatures (Fisher Kernel features from CHMM) and CRealFileFeatures (vectors
fetched from a binary file). It should be noted that all
feature objects are derived from CFeatures
More complex
fetched from a binary file). It should be noted that all
feature objects are derived from CFeatures
More complex
\li CAttributeFeatures - Features of attribute value pairs.
\li CCombinedDotFeatures - Features that allow stacking of dot features.
\li CCombinedFeatures - Features that allow stacking of arbitrary features.
Expand All @@ -49,7 +49,8 @@
\li CImplicitWeightedSpecFeatures - DotFeatures that implicitly implement weighted spectrum kernel features.
\li CWDFeatures - DotFeatures that implicitly implement weighted degree kernel features.

In addition, labels are represented in CLabels and the alphabet of a string in CAlphabet.
In addition, labels are represented in CLabels and the alphabet of a string in
CAlphabet.



Expand Down Expand Up @@ -112,7 +113,7 @@
\subsection other_regress Others
\li CKRR - Kernel Ridge Regression



\section distrib_sec Distributions
\li CHMM - Hidden Markov Models
Expand Down Expand Up @@ -142,7 +143,7 @@
\li CAUCKernel - To maximize AUC in SVM training (takes a kernel as input)
\li CChi2Kernel - Chi^2 Kernel
\li CCombinedKernel - Combined kernel to work with multiple kernels
\li CCommUlongStringKernel - Spectrum Kernel with spectrums of up to 64bit
\li CCommUlongStringKernel - Spectrum Kernel with spectrums of up to 64bit
\li CCommWordStringKernel - Spectrum kernel with spectrum of up to 16 bit
\li CConstKernel - A ``kernel'' returning a constant
\li CCustomKernel - A user supplied custom kernel
Expand Down

0 comments on commit f8c2851

Please sign in to comment.