Class 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 Detail

      • ScikitLearnPackageV1

        public ScikitLearnPackageV1()
    • 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:
        getPackageHeader in interface IScikitLearnPackage
        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:
        getExtraValues in interface IScikitLearnPackage
        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:
        getModel in interface IScikitLearnPackage
        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:
        loadFromFile in interface IScikitLearnPackage
        Parameters:
        path - Path of file to be loaded.