mlrl.testbed_sklearn.experiments.input.sources package¶
Author Michael Rapp (michael.rapp.ml@gmail.com)
Provides classes that allow to read input data from SVM (light) files.
- class mlrl.testbed_sklearn.experiments.input.sources.SvmFileSource(directory: Path)¶
Bases:
DatasetFileSourceAllows to read a dataset from an SVM (light) file.
- SUFFIX_SVM = 'svm'¶
- class SvmDataset(svm_file: SvmFile)¶
Bases:
objectProvides access to the content of an SVM file.
- static from_file(svm_file: SvmFile) SvmDataset¶
Creates and returns an SVM dataset from given SVM file.
- Parameters:
svm_file – The content of the SVM file
- Returns:
The SVM dataset that has been created
- class SvmFile(feature_matrix: sparray, output_matrix: sparray)¶
Bases:
objectProvides access to the content of an SVM file.
- static from_file(file_path: Path, problem_domain: ProblemDomain) SvmFile¶
Loads the content of an SVM file.
- Parameters:
file_path – The path to the SVM file
problem_domain – The problem domain, the SVM file is concerned with
- Returns:
A SvmFileSource.SvmFile that has been loaded