Class AScikitLearnLearnerFactory

  • All Implemented Interfaces:
    ai.libs.jaicore.components.optimizingfactory.BaseFactory<ai.libs.jaicore.ml.scikitwrapper.ScikitLearnWrapper<org.api4.java.ai.ml.core.evaluation.IPrediction,​org.api4.java.ai.ml.core.evaluation.IPredictionBatch>>, ai.libs.mlplan.core.ILearnerFactory<ai.libs.jaicore.ml.scikitwrapper.ScikitLearnWrapper<org.api4.java.ai.ml.core.evaluation.IPrediction,​org.api4.java.ai.ml.core.evaluation.IPredictionBatch>>, org.api4.java.common.control.ILoggingCustomizable
    Direct Known Subclasses:
    ATwoStepPipelineScikitLearnFactory, ScikitLearnRULFactory

    public abstract class AScikitLearnLearnerFactory
    extends java.lang.Object
    implements ai.libs.mlplan.core.ILearnerFactory<ai.libs.jaicore.ml.scikitwrapper.ScikitLearnWrapper<org.api4.java.ai.ml.core.evaluation.IPrediction,​org.api4.java.ai.ml.core.evaluation.IPredictionBatch>>, 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  
    • Constructor Summary

      Constructors 
      Constructor Description
      AScikitLearnLearnerFactory​(ai.libs.jaicore.ml.core.EScikitLearnProblemType sklearnProblemType)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String extractSKLearnConstructInstruction​(ai.libs.jaicore.components.model.ComponentInstance groundComponent, java.util.Set<java.lang.String> importSet)  
      ai.libs.jaicore.ml.scikitwrapper.ScikitLearnWrapper<org.api4.java.ai.ml.core.evaluation.IPrediction,​org.api4.java.ai.ml.core.evaluation.IPredictionBatch> getComponentInstantiation​(ai.libs.jaicore.components.model.ComponentInstance groundComponent)  
      java.lang.String getLoggerName()  
      abstract java.lang.String getPipelineBuildString​(ai.libs.jaicore.components.model.ComponentInstance groundComponent, java.util.Set<java.lang.String> importSet)  
      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

        public AScikitLearnLearnerFactory​(ai.libs.jaicore.ml.core.EScikitLearnProblemType sklearnProblemType)
    • Method Detail

      • getComponentInstantiation

        public ai.libs.jaicore.ml.scikitwrapper.ScikitLearnWrapper<org.api4.java.ai.ml.core.evaluation.IPrediction,​org.api4.java.ai.ml.core.evaluation.IPredictionBatch> getComponentInstantiation​(ai.libs.jaicore.components.model.ComponentInstance groundComponent)
                                                                                                                                                                                                  throws ai.libs.jaicore.components.exceptions.ComponentInstantiationFailedException
        Specified by:
        getComponentInstantiation in interface ai.libs.jaicore.components.optimizingfactory.BaseFactory<ai.libs.jaicore.ml.scikitwrapper.ScikitLearnWrapper<org.api4.java.ai.ml.core.evaluation.IPrediction,​org.api4.java.ai.ml.core.evaluation.IPredictionBatch>>
        Throws:
        ai.libs.jaicore.components.exceptions.ComponentInstantiationFailedException
      • getPipelineBuildString

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

        public java.lang.String extractSKLearnConstructInstruction​(ai.libs.jaicore.components.model.ComponentInstance 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)