예제 #1
0
    def __init__(self,
                 minValue,
                 maxValue,
                 baseThreshold=0.75,
                 restPeriod=30,
                 maxLeftSemiContextsLenght=7,
                 maxActiveNeuronsNum=15,
                 numNormValueBits=3):

        self.minValue = float(minValue)
        self.maxValue = float(maxValue)
        self.restPeriod = restPeriod
        self.baseThreshold = baseThreshold
        self.maxActNeurons = maxActiveNeuronsNum
        self.numNormValueBits = numNormValueBits

        self.maxBinValue = 2**self.numNormValueBits - 1.0
        self.fullValueRange = self.maxValue - self.minValue
        if self.fullValueRange == 0.0:
            self.fullValueRange = self.maxBinValue
        self.minValueStep = self.fullValueRange / self.maxBinValue

        self.leftFactsGroup = tuple()

        self.contextOperator = ContextOperator(maxLeftSemiContextsLenght)

        self.potentialNewContexts = []

        self.aScoresHistory = [1.0]