Class ScikitLearnPackageV1
- java.lang.Object
-
- ai.sklearn4j.core.packaging.version_1.ScikitLearnPackageV1
-
- All Implemented Interfaces:
IScikitLearnPackage
public class ScikitLearnPackageV1 extends Object implements IScikitLearnPackage
A data class that contains the values stored in the binary package files. This is the default implementation for version 1 of the binary file formats.
-
-
Constructor Summary
Constructors Constructor Description ScikitLearnPackageV1()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>getExtraValues()Gets a Map[String: Object] of the extra values stored by the developer when saving the binary package.ObjectgetModel(String name)Get the primary content stored in binary package file.IScikitLearnPackageHeadergetPackageHeader()Gets the object that stores the information provided in the binary package file header.voidloadFromFile(String path)Loads the binary package from a file.
-
-
-
Method Detail
-
getPackageHeader
public IScikitLearnPackageHeader getPackageHeader()
Gets the object that stores the information provided in the binary package file header. The header include at the minimum the version of the file and the version of scikit-learn used to train the content of the file.- Specified by:
getPackageHeaderin interfaceIScikitLearnPackage- Returns:
- An instance of IScikitLearnPackageHeader containing the parsed information of the file header.
-
getExtraValues
public Map<String,Object> getExtraValues()
Gets a Map[String: Object] of the extra values stored by the developer when saving the binary package.- Specified by:
getExtraValuesin interfaceIScikitLearnPackage- Returns:
- A dictionary that contains the extra values stored along with the binary package file.
-
getModel
public Object getModel(String name)
Get the primary content stored in binary package file.- Specified by:
getModelin interfaceIScikitLearnPackage- Parameters:
name- Name of the content to retrieve.- Returns:
- A scikit-learn object that can now be used in Java.
-
loadFromFile
public void loadFromFile(String path)
Loads the binary package from a file.- Specified by:
loadFromFilein interfaceIScikitLearnPackage- Parameters:
path- Path of file to be loaded.
-
-