Table of Contents

Class TrainData

Namespace
Emgu.CV.ML
Assembly
Emgu.CV.dll

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 IInputArray

Matrix of samples. It should have CV_32F type.

layoutType DataLayoutType

Type of the layout.

response IInputArray

Matrix 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 IInputArray

Vector 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 IInputArray

Vector 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 IInputArray

Optional vector with weights for each sample. It should have CV_32F type.

varType IInputArray

Optional 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()