Class AScikitLearnLearnerFactory

  • All Implemented Interfaces:
    ai.libs.jaicore.components.optimizingfactory.BaseFactory<ai.libs.jaicore.ml.scikitwrapper.IScikitLearnWrapper>, ai.libs.mlplan.core.ILearnerFactory<ai.libs.jaicore.ml.scikitwrapper.IScikitLearnWrapper>, org.api4.java.common.control.ILoggingCustomizable
    Direct Known Subclasses:
    ATwoStepPipelineScikitLearnFactory, ScikitLearnTimeSeriesRegressionFactory

    public abstract class AScikitLearnLearnerFactory
    extends java.lang.Object
    implements ai.libs.mlplan.core.ILearnerFactory<ai.libs.jaicore.ml.scikitwrapper.IScikitLearnWrapper>, org.api4.java.common.control.ILoggingCustomizable
    The SKLearnClassifierFactory takes a ground component instance and parses it into a ScikitLearnWrapper as defined in the project jaicore-ml. This factory may be used in the context of HASCO, especially for ML-Plan.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String N_PREPROCESSOR  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String extractSKLearnConstructInstruction​(ai.libs.jaicore.components.api.IComponentInstance groundComponent, java.util.Set<java.lang.String> importSet)  
      ai.libs.jaicore.ml.scikitwrapper.IScikitLearnWrapper getComponentInstantiation​(ai.libs.jaicore.components.api.IComponentInstance groundComponent)  
      java.lang.String getLoggerName()  
      abstract java.lang.String getPipelineBuildString​(ai.libs.jaicore.components.api.IComponentInstance groundComponent, java.util.Set<java.lang.String> importSet)  
      abstract ai.libs.jaicore.ml.scikitwrapper.IScikitLearnWrapper getScikitLearnWrapper​(java.lang.String constructionString, java.lang.String imports)  
      void setLoggerName​(java.lang.String name)  
      void setPythonConfig​(ai.libs.python.IPythonConfig pythonConfig)  
      void setSeed​(long seed)  
      void setTimeout​(org.api4.java.algorithm.Timeout timeout)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AScikitLearnLearnerFactory

        protected AScikitLearnLearnerFactory()
    • Method Detail

      • getScikitLearnWrapper

        public abstract ai.libs.jaicore.ml.scikitwrapper.IScikitLearnWrapper getScikitLearnWrapper​(java.lang.String constructionString,
                                                                                                   java.lang.String imports)
                                                                                            throws java.io.IOException,
                                                                                                   java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • getComponentInstantiation

        public ai.libs.jaicore.ml.scikitwrapper.IScikitLearnWrapper getComponentInstantiation​(ai.libs.jaicore.components.api.IComponentInstance groundComponent)
                                                                                       throws ai.libs.jaicore.components.exceptions.ComponentInstantiationFailedException,
                                                                                              java.lang.InterruptedException
        Specified by:
        getComponentInstantiation in interface ai.libs.jaicore.components.optimizingfactory.BaseFactory<ai.libs.jaicore.ml.scikitwrapper.IScikitLearnWrapper>
        Throws:
        ai.libs.jaicore.components.exceptions.ComponentInstantiationFailedException
        java.lang.InterruptedException
      • getPipelineBuildString

        public abstract java.lang.String getPipelineBuildString​(ai.libs.jaicore.components.api.IComponentInstance groundComponent,
                                                                java.util.Set<java.lang.String> importSet)
      • extractSKLearnConstructInstruction

        public java.lang.String extractSKLearnConstructInstruction​(ai.libs.jaicore.components.api.IComponentInstance groundComponent,
                                                                   java.util.Set<java.lang.String> importSet)
      • getLoggerName

        public java.lang.String getLoggerName()
        Specified by:
        getLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
      • setLoggerName

        public void setLoggerName​(java.lang.String name)
        Specified by:
        setLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
      • setPythonConfig

        public void setPythonConfig​(ai.libs.python.IPythonConfig pythonConfig)
      • setSeed

        public void setSeed​(long seed)
      • setTimeout

        public void setTimeout​(org.api4.java.algorithm.Timeout timeout)