In R, after running "random forest" model, I can use save.image("***.RData") to store the model. Afterwards, I can just load the model to do predictions directly.
Can you do a similar thing in python? I separate the Model and Prediction into two files. And in Model file:
rf= RandomForestRegressor(n_estimators=250, max_features=9,compute_importances=True)
fit= rf.fit(Predx, Predy)
I tried to return rf or fit, but still can't load the model in the prediction file.
Can you separate the model and prediction using the sklearn random forest package?
save.imagesaves everything in your workspace, including datasets, working variables, etc. If you only want the fitted model, usesave.