Table of Contents

Method GetTrainSamples

Namespace
OpenCvSharp.ML
Assembly
OpenCvSharp.dll

GetTrainSamples(SampleTypes, bool, bool)

Returns matrix of train samples

public Mat GetTrainSamples(SampleTypes layout = SampleTypes.RowSample, bool compressSamples = true, bool compressVars = true)

Parameters

layout SampleTypes

The requested layout. If it's different from the initial one, the matrix is transposed. See ml::SampleTypes.

compressSamples bool

if true, the function returns only the training samples (specified by sampleIdx)

compressVars bool

if true, the function returns the shorter training samples, containing only the active variables.

Returns

Mat