ML.DecTree.randomforest

Package ML :: Package DecTree :: Module randomforest |
[hide private]
[frames] | no frames]

# Source Code for Module ML.DecTree.randomforest

     1  from Numeric import *
     2  import RandomArray
     3  from ML.DecTree import ID3,CrossValidate,Forest
     4  from ML.DecTree import randomtest
     5
     6  if __name__ == '__main__':
     7      examples,attrs,nPossibleVals = randomtest.GenRandomExamples(nExamples=100)
     8      forest = Forest.Forest()
     9      forest.Grow(examples,attrs,nPossibleVals,nTries=10)
    10      print str(forest)
    11      forest.Pickle('regress/RandomForest.pkl')
    12