Can't instantiate abstract class RandomSurvivalForest with abstract methods _set_oob_score

不知道怎么回事一直报错

TypeError                                 Traceback (most recent call last)
<ipython-input-8-c8248cca9338> in <module>()
      1 model_sq = SurvivalQuilts()
----> 2 model_sq.train(X,T,Y)

D:\python file\survivalquilts\class_SurvivalQuilts.py in train(self, X, T, Y)
     55         for cv_idx in range(self.num_cv):
     56             print('CV.. {}/{}'.format(cv_idx+1, self.num_cv))
---> 57             pulled_models, tmp_CINDEX, tmp_BRIER = self._get_models_pulled_CV(X, T, Y, seed=cv_idx)
     58 
     59             metric_CINDEX[cv_idx,:,:] = tmp_CINDEX

D:\python file\survivalquilts\class_SurvivalQuilts.py in _get_models_pulled_CV(self, X, T, Y, seed)
    282         X_tr, X_va, T_tr, T_va, Y_tr, Y_va = train_test_split(X, T, Y, test_size=0.20, random_state=seed+self.SEED)
    283 
--> 284         pulled_models = self._get_trained_models(X_tr, T_tr, Y_tr)
    285 
    286         metric_CINDEX, metric_BRIER = np.zeros([self.M, self.K]), np.zeros([self.M, self.K])

D:\python file\survivalquilts\class_SurvivalQuilts.py in _get_trained_models(self, X, T, Y)
    298 
    299     def _get_trained_models(self, X, T, Y):
--> 300         models = self._make_ModelList()
    301         for m in range(self.M):
    302             models[m].fit(X, T,  Y)

D:\python file\survivalquilts\class_SurvivalQuilts.py in _make_ModelList(self)
    212                 models += [LogLogistic()]
    213             elif tmp_name == 'RandomSurvForest':
--> 214                 models += [RandomSurvForest()]
    215         return models
    216 

D:\python file\survivalquilts\class_UnderlyingModels.py in __init__(self, n_estimators)
    128         self.name          = 'RandomSurvForest'
    129 
--> 130         self.model         = RandomSurvivalForest(n_estimators=self.n_estimators)
    131         self.direction     = 1
    132         self.prob_FLAG     = True

TypeError: Can't instantiate abstract class RandomSurvivalForest with abstract methods _set_oob_score****

可能是已经在基本抽象类中定义了抽象方法,并在其前面加上了__(双下划线)。 导致python在定义类时进行名称修饰。

缺少随机森林的set