[−][src]Trait neuro::data::DataSet
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)