Click or drag to resize
TrainData Constructor
http://www.emgu.com
Creates training data from in-memory arrays.

Namespace:  Emgu.CV.ML
Assembly:  Emgu.CV.World (in Emgu.CV.World.dll) Version: 3.3.0.2824 (3.3.0.2824)
Syntax
public TrainData(
	IInputArray samples,
	DataLayoutType layoutType,
	IInputArray response,
	IInputArray varIdx = null,
	IInputArray sampleIdx = null,
	IInputArray sampleWeight = null,
	IInputArray varType = null
)

Parameters

samples
Type: Emgu.CVIInputArray
Matrix of samples. It should have CV_32F type.
layoutType
Type: Emgu.CV.ML.MlEnumDataLayoutType
Type of the layout.
response
Type: Emgu.CVIInputArray
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 (Optional)
Type: Emgu.CVIInputArray
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 (Optional)
Type: Emgu.CVIInputArray
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 (Optional)
Type: Emgu.CVIInputArray
Optional vector with weights for each sample. It should have CV_32F type.
varType (Optional)
Type: Emgu.CVIInputArray
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.
See Also