Dataset containing features, classes and labels useful for classification purpose.
More...
|
| | Dataset () |
| | Constructs an empty Dataset object.
|
| | Dataset (Array< Array< float > > inFeatures, Array< string > inHeader) |
| | Constructs a new Dataset object given input features.
|
| | Dataset (Array< Array< float > > inFeatures, Array< int > inClasses, Array< string > inHeader) |
| | Constructs a new Dataset object given input features and their corresponding classes.
|
| | Dataset (Array< Array< float > > inFeatures, Array< string > inLabels, Array< string > inHeader) |
| | Constructs a new Dataset object given input features and their corresponding labels.
|
|
Dataset | Copy () |
| Array< Array< float > > | GetFeatures () |
| | Returns all the features.
|
| Array< int > | GetClasses () |
| | Returns all the classes.
|
| Array< string > | GetLabels () |
| | Returns all the labels.
|
| Array< string > | GetHeader () |
| | Returns the file header.
|
| int | GetSize () |
| | Returns the number of samples in the entire dataset.
|
| int | GetLabelsSize () |
| | Returns the number of labels in the dataset.
|
| void | SaveToCSV (string inFilename, char inDelimiter, bool inWriteHeader, bool inWriteLabels, int inDecimalPrecision) |
| | Saves the dataset to a CSV file.
|
| void | Split (float inTrainingRatio, bool inShuffle, Dataset outTrainDataset, Dataset outTestDataset) |
| | Splits the dataset into training and testing sets.
|
| void | Standardize () |
| | Standardize dataset features (i.e., zero mean, unitary standard deviation)
|
|
override object | Clone () |
|
override void | Dispose () |
|
| static Dataset | LoadFromCSV (string inFilename, int inHeaderLinesToSkip=0, char inDelimiter=',', Optional< int > inHeaderLineIndex=null, Optional< int > inClassIndex=null, Optional< Range > inFeaturesIndices=null) |
| | Loads a dataset from a CSV file.
|
Dataset containing features, classes and labels useful for classification purpose.
It can also manage the splitting into training and testing sets.
◆ Dataset() [1/4]
| oevislib_net.DataClassification.Dataset.Dataset |
( |
| ) |
|
|
inline |
Constructs an empty Dataset object.
◆ Dataset() [2/4]
| oevislib_net.DataClassification.Dataset.Dataset |
( |
Array< Array< float > > | inFeatures, |
|
|
Array< string > | inHeader ) |
|
inline |
Constructs a new Dataset object given input features.
- Parameters
-
| inFeatures | Input features. |
| inHeader | Input header (containing the features' names). If empty, is not considered. |
◆ Dataset() [3/4]
| oevislib_net.DataClassification.Dataset.Dataset |
( |
Array< Array< float > > | inFeatures, |
|
|
Array< int > | inClasses, |
|
|
Array< string > | inHeader ) |
|
inline |
Constructs a new Dataset object given input features and their corresponding classes.
- Parameters
-
| inFeatures | Input features. |
| inClasses | Input classes. |
| inHeader | Input header (containing the features' names). If empty, is not considered. |
◆ Dataset() [4/4]
| oevislib_net.DataClassification.Dataset.Dataset |
( |
Array< Array< float > > | inFeatures, |
|
|
Array< string > | inLabels, |
|
|
Array< string > | inHeader ) |
|
inline |
Constructs a new Dataset object given input features and their corresponding labels.
- Parameters
-
| inFeatures | Input features. |
| inLabels | Input labels. |
| inHeader | Input header (containing the features' names). If empty, is not considered. |
◆ GetClasses()
| Array< int > oevislib_net.DataClassification.Dataset.GetClasses |
( |
| ) |
|
|
inline |
Returns all the classes.
- Returns
- Classes.
◆ GetFeatures()
| Array< Array< float > > oevislib_net.DataClassification.Dataset.GetFeatures |
( |
| ) |
|
|
inline |
Returns all the features.
- Returns
- Features.
◆ GetHeader()
| Array< string > oevislib_net.DataClassification.Dataset.GetHeader |
( |
| ) |
|
|
inline |
Returns the file header.
- Returns
- Header.
◆ GetLabels()
| Array< string > oevislib_net.DataClassification.Dataset.GetLabels |
( |
| ) |
|
|
inline |
Returns all the labels.
- Returns
- Labels.
◆ GetLabelsSize()
| int oevislib_net.DataClassification.Dataset.GetLabelsSize |
( |
| ) |
|
|
inline |
Returns the number of labels in the dataset.
- Returns
- Labels size.
◆ GetSize()
| int oevislib_net.DataClassification.Dataset.GetSize |
( |
| ) |
|
|
inline |
Returns the number of samples in the entire dataset.
- Returns
- Dataset size.
◆ LoadFromCSV()
| Dataset oevislib_net.DataClassification.Dataset.LoadFromCSV |
( |
string | inFilename, |
|
|
int | inHeaderLinesToSkip = 0, |
|
|
char | inDelimiter = ',', |
|
|
Optional< int > | inHeaderLineIndex = null, |
|
|
Optional< int > | inClassIndex = null, |
|
|
Optional< Range > | inFeaturesIndices = null ) |
|
inlinestatic |
Loads a dataset from a CSV file.
- Parameters
-
| inFilename | Filename. |
| inHeaderLinesToSkip | Number of header lines (to exclude when extracting features). |
| inDelimiter | Delimiter between features. |
| inHeaderLineIndex | Index of the header line (starting from 0 and below the number of inHeaderLinesToSkip). When loaded, the name corresponding to the class (if present), is excluded. |
| inClassIndex | Index of the class column (starting from 0). If Null, classes are not loaded. |
| inFeaturesIndices | Indices of the features columns. If Null, all features are loaded. |
- Returns
- Dataset
◆ SaveToCSV()
| void oevislib_net.DataClassification.Dataset.SaveToCSV |
( |
string | inFilename, |
|
|
char | inDelimiter, |
|
|
bool | inWriteHeader, |
|
|
bool | inWriteLabels, |
|
|
int | inDecimalPrecision ) |
|
inline |
Saves the dataset to a CSV file.
- Parameters
-
| inFilename | Filename. |
| inDelimiter | Delimiter between features. |
| inWriteHeader | Whether to write the header as the first line. |
| inWriteLabels | Whether to write the labels in the first column. |
| inDecimalPrecision | How many decimal places to write. |
◆ Split()
| void oevislib_net.DataClassification.Dataset.Split |
( |
float | inTrainingRatio, |
|
|
bool | inShuffle, |
|
|
Dataset | outTrainDataset, |
|
|
Dataset | outTestDataset ) |
|
inline |
Splits the dataset into training and testing sets.
- Parameters
-
| inTrainingRatio | Ratio of the training set. |
| inShuffle | Whether to shuffle the dataset before splitting. |
| outTrainDataset | Training dataset. |
| outTestDataset | Testing dataset. |
◆ Standardize()
| void oevislib_net.DataClassification.Dataset.Standardize |
( |
| ) |
|
|
inline |
Standardize dataset features (i.e., zero mean, unitary standard deviation)