[][src]Trait neuro::data::DataSet

pub trait DataSet {
    fn input_shape(&self) -> Dim;
fn output_shape(&self) -> Dim;
fn num_train_samples(&self) -> u64;
fn num_valid_samples(&self) -> u64;
fn x_train(&self) -> &Tensor;
fn y_train(&self) -> &Tensor;
fn x_valid(&self) -> Option<&Tensor>;
fn y_valid(&self) -> Option<&Tensor>;
fn x_test(&self) -> Option<&Tensor>;
fn y_test(&self) -> Option<&Tensor>;
fn x_train_stats(&self) -> &Option<(Scaling, Tensor, Tensor)>;
fn y_train_stats(&self) -> &Option<(Scaling, Tensor, Tensor)>; fn classes(&self) -> Option<Vec<String>> { ... } }

Trait that must be implemented for any type of dataset supported by neuro.

Required methods

fn input_shape(&self) -> Dim

Returns the dimension of the samples.

fn output_shape(&self) -> Dim

Returns the dimension of the labels.

fn num_train_samples(&self) -> u64

Returns the number of samples in the training set.

fn num_valid_samples(&self) -> u64

Returns the number of samples in the validation set.

fn x_train(&self) -> &Tensor

Returns a reference to the training samples.

fn y_train(&self) -> &Tensor

Returns a reference to the training labels.

fn x_valid(&self) -> Option<&Tensor>

Returns a reference to the validation samples.

fn y_valid(&self) -> Option<&Tensor>

Returns a reference to the validation labels.

fn x_test(&self) -> Option<&Tensor>

Returns a reference to the test samples.

fn y_test(&self) -> Option<&Tensor>

Returns a reference to the test labels.

fn x_train_stats(&self) -> &Option<(Scaling, Tensor, Tensor)>

Returns a reference to the type of scaling that has been applied to the input features and the values used for the scaling.

If scaling has been applied, the returned tuple contains the following:

  • Normalization: (Scaling::Normalized, minimum value, maximum value)
  • Standardization: (Scaling::Standarized, mean, standard deviation)

fn y_train_stats(&self) -> &Option<(Scaling, Tensor, Tensor)>

Returns a reference to the type of scaling that has been applied to the output labels and the values used for the scaling.

If scaling has been applied, the returned tuple contains the following:

  • Normalization: (Scaling::Normalized, minimum value, maximum value)
  • Standardization: (Scaling::Standarized, mean, standard deviation)
Loading content...

Provided methods

fn classes(&self) -> Option<Vec<String>>

Returns the classes in the data set.

Loading content...

Implementors

impl DataSet for ImageDataSet[src]

impl DataSet for TabularDataSet[src]

Loading content...