Class TrainData
- Namespace
- OpenCvSharp.ML
- Assembly
- OpenCvSharp.dll
Training data used by the ml algorithms
public class TrainData : CvPtrObject, IDisposable
- Inheritance
-
TrainData
- Implements
- Inherited Members
Methods
- Create(InputArray, SampleTypes, InputArray, InputArray, InputArray, InputArray, InputArray)
Creates training data from in-memory arrays.
- GetClassLabels()
Returns the vector of class labels
- GetLayout()
Returns the layout (ml::SampleTypes) used by this training data.
- GetMissing()
Returns the mask of missing values in the samples
- GetNAllVars()
Returns the number of variables including the responses
- GetNSamples()
Returns the total number of samples
- GetNTestSamples()
Returns the number of test samples
- GetNTrainSamples()
Returns the number of training samples
- GetNVars()
Returns the number of variables
- GetResponses()
Returns the vector of responses
- GetSamples()
Returns the matrix of all the samples
- GetTestResponses()
Returns the vector of responses for the test samples
- GetTestSampleIdx()
Returns the indices of the test samples
- GetTestSamples()
Returns matrix of test samples
- GetTrainResponses()
Returns the vector of responses for the training samples
- GetTrainSampleIdx()
Returns the indices of the training samples
- GetTrainSamples(SampleTypes, bool, bool)
Returns matrix of train samples
- GetVarIdx()
Returns the vector of variable indices used for training
- GetVarType()
Returns the type of each input and output variable
- LoadFromCSV(string, int, int, int, string, char, char)
Reads the dataset from a .csv file and returns the ready-to-use training data.
- SetTrainTestSplit(int, bool)
Splits the training data into the training and test parts
- SetTrainTestSplitRatio(double, bool)
Splits the training data into the training and test parts
- ShuffleTrainTest()
Shuffles the training and test sample indices