[−][src]Struct neuro::data::TabularDataSet
Structure representing tabular data.
Methods
impl TabularDataSet
[src]
pub fn from_csv(
inputs: &Path,
outputs: &Path,
valid_frac: f64,
header: bool
) -> Result<TabularDataSet, Error>
[src]
inputs: &Path,
outputs: &Path,
valid_frac: f64,
header: bool
) -> Result<TabularDataSet, Error>
Creates a TabularDataSet from a set of csv files.
The data are shuffled before being split into training and validation sets.
Arguments
inputs
- The path to the csv file containing the input features.outputs
- The path to the csv file containing the output labels.valid_frac
- The fraction of the data used for validation.header
- Flag indicating whether the files have a header.
pub fn from_tensor(
x_train: Tensor,
y_train: Tensor,
x_valid: Option<Tensor>,
y_valid: Option<Tensor>,
x_test: Option<Tensor>,
y_test: Option<Tensor>
) -> Result<TabularDataSet, Error>
[src]
x_train: Tensor,
y_train: Tensor,
x_valid: Option<Tensor>,
y_valid: Option<Tensor>,
x_test: Option<Tensor>,
y_test: Option<Tensor>
) -> Result<TabularDataSet, Error>
Creates a TabularDataSet from Tensors.
The samples must be stacked along the fourth dimension.
pub fn normalize_input(&mut self)
[src]
Normalizes the features of the training, validation, and test (if any) sets.
The minimum and maximum values of the training features are computed and used to normalize the training, validation, and test sets. After normalization, the distribution of the features in the training sets is a uniform distribution within 0 and 1 (assuming that the features originally come from a uniform distribution).
pub fn standardize_input(&mut self)
[src]
Standardizes the features of the training, validation, and test (if any) sets.
The mean and standard deviation of the training features are computed and used to standardize the training, validation, and test sets. After standardization, the distribution of the features in the training set is a normal distribution with a mean of 0 and standard deviation 1 (assuming that the features originally come from a Gaussian distribution).
pub fn normalize_output(&mut self)
[src]
Normalizes the labels of the training, validation, and test (if any) sets.
The minimum and maximum values of the training labels are computed and used to normalize the training, validation, and test sets. After normalization, the distribution of the labels in the training sets is a uniform distribution within 0 and 1 (assuming that the labels originally come from a uniform distribution).
pub fn standardize_output(&mut self)
[src]
Standardizes the labels of the training, validation, and test (if any) sets.
The mean and standard deviation of the training labels are computed and used to standardize the training, validation, and test sets. After standardization, the distribution of the labels in the training set is a normal distribution with a mean of 0 and standard deviation 1 (assuming that the labels originally come from a Gaussian distribution).
Trait Implementations
impl DataSet for TabularDataSet
[src]
fn input_shape(&self) -> Dim4
[src]
fn output_shape(&self) -> Dim4
[src]
fn num_train_samples(&self) -> u64
[src]
fn num_valid_samples(&self) -> u64
[src]
fn x_train(&self) -> &Tensor
[src]
fn y_train(&self) -> &Tensor
[src]
fn x_valid(&self) -> Option<&Tensor>
[src]
fn y_valid(&self) -> Option<&Tensor>
[src]
fn x_test(&self) -> Option<&Tensor>
[src]
fn y_test(&self) -> Option<&Tensor>
[src]
fn x_train_stats(&self) -> &Option<(Scaling, Tensor, Tensor)>
[src]
fn y_train_stats(&self) -> &Option<(Scaling, Tensor, Tensor)>
[src]
fn classes(&self) -> Option<Vec<String>>
[src]
impl Display for TabularDataSet
[src]
Auto Trait Implementations
impl RefUnwindSafe for TabularDataSet
impl Send for TabularDataSet
impl Sync for TabularDataSet
impl Unpin for TabularDataSet
impl UnwindSafe for TabularDataSet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,