def demo():
import sys
sys.path.append( '../core' )
from tools import make_XOR_dataset
X,Y = make_XOR_dataset()
N,L = Y.shape
from sklearn import linear_model
h_ = linear_model.SGDClassifier(n_iter=100)
from CC import RCC
cc = RCC(h=h_)
e = Ensemble(n_estimators=10,base_estimator=cc)
e.fit(X, Y)
# test it
print(e.predict(X))
print("vs")
print(Y)
评论列表
文章目录