Beispiel #1
0
 def __init__(self,
              ntrees=255,
              use_feature_importance=False,
              sample_classes_individually=False):
     self.rf = BaseVigraRandomForest(
         treeCount=ntrees,
         sample_classes_individually=sample_classes_individually)
     self.use_feature_importance = use_feature_importance
     self.sample_classes_individually = sample_classes_individually
Beispiel #2
0
 def load_from_disk(self, fn, rfgroupname='rf'):
     self.rf = BaseVigraRandomForest(str(fn), rfgroupname)
     f = h5py.File(fn, 'r')
     for attr in f[rfgroupname].attrs:
         print("f[%s] = %s" % (attr, f[rfgroupname].attrs[attr]))
         setattr(self, attr, f[rfgroupname].attrs[attr])