Class TrainData
Train data
public class TrainData : SharedPtrObject, IDisposable
- Inheritance
-
TrainData
- Implements
- Inherited Members
Constructors
TrainData(IInputArray, DataLayoutType, IInputArray, IInputArray, IInputArray, IInputArray, IInputArray)
Creates training data from in-memory arrays.
public TrainData(IInputArray samples, DataLayoutType layoutType, IInputArray response, IInputArray varIdx = null, IInputArray sampleIdx = null, IInputArray sampleWeight = null, IInputArray varType = null)
Parameters
samples
IInputArrayMatrix of samples. It should have CV_32F type.
layoutType
DataLayoutTypeType of the layout.
response
IInputArrayMatrix of responses. If the responses are scalar, they should be stored as a single row or as a single column. The matrix should have type CV_32F or CV_32S (in the former case the responses are considered as ordered by default; in the latter case - as categorical)
varIdx
IInputArrayVector specifying which variables to use for training. It can be an integer vector (CV_32S) containing 0-based variable indices or byte vector (CV_8U) containing a mask of active variables.
sampleIdx
IInputArrayVector specifying which samples to use for training. It can be an integer vector (CV_32S) containing 0-based sample indices or byte vector (CV_8U) containing a mask of training samples.
sampleWeight
IInputArrayOptional vector with weights for each sample. It should have CV_32F type.
varType
IInputArrayOptional vector of type CV_8U and size <number_of_variables_in_samples> + <number_of_variables_in_responses>, containing types of each input and output variable.
Methods
DisposeObject()
Release the unmanaged resources
protected override void DisposeObject()