C++ 的机器学习库:MLPACK

jopen 11年前

MLPACK 是一个 C++ 的机器学习库,其重点是可伸缩性、速度和易用。

示例代码:

#include <mlpack/methods/range_search/range_search.hpp>    using namespace mlpack::range;    // Our dataset matrix, which is column-major.  extern arma::mat dataset;    // The 'true' option indicates that we will use naive calculation.  RangeSearch<> a(dataset, true);    // The vector-of-vector objects we will store output in.  std::vector<std::vector<size_t> > resultingNeighbors;  std::vector<std::vector<double> > resultingDistances;    // The range we will use.  The upper bound is DBL_MAX.  math::Range r(5.0, DBL_MAX); // [5.0, inf).    a.Search(r, resultingNeighbors, resultingDistances);

项目主页:http://www.open-open.com/lib/view/home/1377530057370