docs.rs failed to build shogun-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
shogun-rust
This is a Rust crate with bindings to the Shogun machine learning framework.
Note: this crate is in very early development and only supports a very limited part of the Shogun library. Note: this is just a Rust wrapper for the shogun C++ library so the internals/API are not very Rust-like.
More information about the design can be found here.
Build
Assumes you have shogun-static installed locally, as well as spdlog. If not found CMake will throw an error.
To build simply:
And then from another crate:
extern crate shogun;
Example
Basic API
use ;
Training a Random Forest
let f_feats_train = read_csv?;
let f_feats_test = read_csv?;
let f_labels_train = read_csv?;
let f_labels_test = read_csv?;
let features_train = from_file?;
let features_test = from_file?;
let labels_train = from_file?;
let labels_test = from_file?;
let mut rand_forest = new?;
let m_vote = new?;
rand_forest.put?;
rand_forest.put?;
rand_forest.put?;
rand_forest.put?;
rand_forest.train?;
let predictions = rand_forest.apply?;
let acc = new?;
rand_forest.put?;
let accuracy = acc.evaluate?;
println!;