Struct fann::TrainData [] [src]

pub struct TrainData {
    // some fields omitted
}

Methods

impl TrainData
[src]

fn from_file<P: AsRef<Path>>(path: P) -> FannResult<TrainData>

Read a file that stores training data.

The file must be formatted like:

num_train_data num_input num_output
inputdata separated by space
outputdata separated by space
.
.
.
inputdata separated by space
outputdata separated by space

fn save<P: AsRef<Path>>(&self, path: P) -> FannResult<()>

Save the training data to a file.

fn merge(data1: &TrainData, data2: &TrainData) -> FannResult<TrainData>

Merge the given data sets into a new one.

fn subset(&self, pos: c_uint, length: c_uint) -> FannResult<TrainData>

Create a subset of the training data, starting at the given positon and consisting of length samples.

fn length(&self) -> c_uint

Return the number of training patterns in the data.

fn num_input(&self) -> c_uint

Return the number of input values in each training pattern.

fn num_output(&self) -> c_uint

Return the number of output values in each training pattern.

fn scale_for(&mut self, fann: &Fann) -> FannResult<()>

Scale input and output in the training data using the parameters previously calculated for the given network.

fn descale_for(&mut self, fann: &Fann) -> FannResult<()>

Descale input and output in the training data using the parameters previously calculated for the given network.

fn scale_input(&mut self, new_min: fann_type, new_max: fann_type) -> FannResult<()>

Scales the inputs in the training data to the specified range.

fn scale_output(&mut self, new_min: fann_type, new_max: fann_type) -> FannResult<()>

Scales the outputs in the training data to the specified range.

fn scale(&mut self, new_min: fann_type, new_max: fann_type) -> FannResult<()>

Scales the inputs and outputs in the training data to the specified range.

fn shuffle(&mut self)

Shuffle training data, randomizing the order. This is recommended for incremental training while it does not affect batch training.

unsafe fn get_raw(&self) -> *mut fann_train_data

Get a pointer to the underlying raw fann_train_data structure.

Trait Implementations

impl Clone for TrainData
[src]

fn clone(&self) -> TrainData

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Drop for TrainData
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more