AIXI.CTWContextTreeFast.Predict C# (CSharp) 메소드

Predict() 공개 메소드

public Predict ( int symbolList ) : double
symbolList int
리턴 double
        public double Predict(int[] symbolList)
        {
            int symbolListLength = symbolList.Length;
            if (this.History.Count + symbolListLength <= this.Depth)
            {
                return Math.Pow(0.5, symbolListLength); //note: diff from pyaixi: removing if
            }

            double probHistory = this.Nodes[this.RootI].LogProbability;

            this.update_tree(symbolList);
            double probSequence = this.Nodes[this.RootI].LogProbability;
            this.revert_tree(symbolListLength);
            return Math.Exp(probSequence - probHistory);
        }