On this page, several simple mlpack examples are contained, in increasing order of complexity. If you compile from the command-line, be sure that your compiler is in C++11 mode. With gcc and clang, this can be accomplished by adding the
A simple program to compute the covariance of a data matrix ("data.csv"), assuming that the data is already centered, and save it to file.
This simple program uses the mlpack::neighbor::NeighborSearch object to find the nearest neighbor of each point in a dataset using the L1 metric, and then print the index of the neighbor and the distance of it to stdout.
For more complex examples, it is useful to refer to the main executables:
Generated by 1.8.13