本文整理汇总了Python中Classifier.Classifier.setCurrentIterationNumber方法的典型用法代码示例。如果您正苦于以下问题:Python Classifier.setCurrentIterationNumber方法的具体用法?Python Classifier.setCurrentIterationNumber怎么用?Python Classifier.setCurrentIterationNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Classifier.Classifier
的用法示例。
在下文中一共展示了Classifier.setCurrentIterationNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: LearnerBuilder
# 需要导入模块: from Classifier import Classifier [as 别名]
# 或者: from Classifier.Classifier import setCurrentIterationNumber [as 别名]
class LearnerBuilder(object):
# #created @link python.learner.Learner.Learner Learner @endlink object
__learner = None
# #@link python.pysgpp.extensions.datadriven.controller.CheckpointController.CheckpointController
# CheckpointController @endlink if any used
__checkpointController = None
__gridDescriptor = None
__specificationDescriptor = None
__stopPolicyDescriptor = None
__solverDescriptor = None
##
# Default constuctor
##
def __init__(self):
self.__learner = None
self.__gridDescriptor = None
self.__specificationDescriptor = None
self.__stopPolicyDescriptor = None
## Returns the object of learner subclass, that is currently beeing constructed
# @return the object of learner subclass, that is currently beeing constructed
def getLearner(self):
return self.__learner
## Returns the checkpoint controller
# @return the checkpoint controller
def getCheckpointController(self):
return self.__checkpointController
## Start building Regressor
# @return: LearnerBuilder itself
##
def buildRegressor(self):
self.__learner = Regressor()
return self.__buildCommonLearner(self.__learner)
## Start building Classifier
# @return: LearnerBuilder itself
##
def buildClassifier(self,):
self.__learner = Classifier()
return self.__buildCommonLearner(self.__learner)
def __buildCommonLearner(self, learner):
learnedKnowledge = LearnedKnowledge()
learner.setLearnedKnowledge(learnedKnowledge)
#stopPolicy = TrainingStopPolicy()
#learner.setStopPolicy(stopPolicy)
return self
## Start description of specification parameters for learner
# @return: SpecificationDescriptor
##
def withSpecification(self):
self.__specificationDescriptor = LearnerBuilder.SpecificationDescriptor(self)
return self.__specificationDescriptor
## Start description of parameters of CG-Solver for learner
# @return: CGSolverDescriptor
##
def withCGSolver(self):
self.__solverDescriptor = LearnerBuilder.CGSolverDescriptor(self)
return self.__solverDescriptor
## Start description of parameters of CG-Solver for learner
# @return: GridDescriptor
##
def withGrid(self):
self.__gridDescriptor = LearnerBuilder.GridDescriptor(self)
return self.__gridDescriptor
##
#Set the starting iteration number ane return the builder object
#
# @param iteration: integer starting iteration number
# @return: LeanreBuilder
##
def withStartingIterationNumber(self, iteration):
self.__learner.setCurrentIterationNumber(iteration)
return self
##
# Start description of parameters of stop-policy for learner
# @return: StopPolicyDescriptor
##
#.........这里部分代码省略.........