http://www.emgu.com
Creates training data from in-memory arrays.
Namespace: Emgu.CV.MLAssembly: Emgu.CV.ML (in Emgu.CV.ML.dll) Version: 3.0.0.2161 (3.0.0.2161)
Syntaxpublic TrainData(
IInputArray samples,
DataLayoutType layoutType,
IInputArray response,
IInputArray varIdx = null,
IInputArray sampleIdx = null,
IInputArray sampleWeight = null,
IInputArray varType = null
)
Public Sub New (
samples As IInputArray,
layoutType As DataLayoutType,
response As IInputArray,
Optional varIdx As IInputArray = Nothing,
Optional sampleIdx As IInputArray = Nothing,
Optional sampleWeight As IInputArray = Nothing,
Optional varType As IInputArray = Nothing
)
public:
TrainData(
IInputArray^ samples,
DataLayoutType layoutType,
IInputArray^ response,
IInputArray^ varIdx = nullptr,
IInputArray^ sampleIdx = nullptr,
IInputArray^ sampleWeight = nullptr,
IInputArray^ varType = nullptr
)
new :
samples : IInputArray *
layoutType : DataLayoutType *
response : IInputArray *
?varIdx : IInputArray *
?sampleIdx : IInputArray *
?sampleWeight : IInputArray *
?varType : IInputArray
(* Defaults:
let _varIdx = defaultArg varIdx null
let _sampleIdx = defaultArg sampleIdx null
let _sampleWeight = defaultArg sampleWeight null
let _varType = defaultArg varType null
*)
-> TrainData
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