Method LoadFromCSV
- Namespace
- OpenCvSharp.ML
- Assembly
- OpenCvSharp.dll
LoadFromCSV(string, int, int, int, string, char, char)
Reads the dataset from a .csv file and returns the ready-to-use training data.
public static TrainData LoadFromCSV(string filename, int headerLineCount, int responseStartIdx = -1, int responseEndIdx = -1, string varTypeSpec = "", char delimiter = ',', char missch = '?')
Parameters
filenamestringThe input file name
headerLineCountintThe number of lines in the beginning to skip; besides the header, the function also skips empty lines and lines starting with '#'
responseStartIdxintIndex of the first output variable. If -1, the function considers the last variable as the response
responseEndIdxintIndex of the last output variable + 1. If -1, then there is single response variable at responseStartIdx.
varTypeSpecstringThe optional text string that specifies the variables' types. It has the format
ord[n1-n2,n3,n4-n5,...]cat[n6,n7-n8,...].delimitercharThe character used to separate values in each line.
misschcharThe character used to specify missing measurements. It should not be a digit.