I need an equation for random forest so that I can score fresh data I receive every week, based on beta estimates I got after building model using this ensemble methodology.
Every week I do not want to build random forest model again and then score it using following commands in Python. Because I have build 15 such models and I need to score them every week. So easiest way is to get the equation (betas I already have) and score.
# importing the ensemble libraries from `numpy` import `genfromtxt` from `sklearn.metrics` import `classification_report` #importing the dataset dataset = genfromtxt(open('~//win_5050_6oct.csv','r'))[1:] target = [x for x in dataset] train = [x[2:] for x in dataset] test = genfromtxt(open('~\\win_act_6oct.csv','r'))[1:] val = [x[2:] for x in test] y_act = [x for x in test] Gst_i=[x for x in test] #building random forest model rf = RandomForestClassifier(n_estimators=100) rf.fit(train, target)