I used the package for random forest. It is not clear to me how to use the results. In logistic regression you can have an equation as an output, in standard tree some rules. If you receive a new dataset you can apply the equation on the new data and predict an outcome (like default/no default). Or saying the customers with characteristics a and characteristics b will have a default, so you can predict the outcome before it happens. That is the scoring tecnique.
Is it possible to use random forest in a similar situation, or how would you use the results of a RF?
my python code:
from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import roc_auc_score #creating a test and train dataset from sklearn.cross_validation import train_test_split train, test = train_test_split(df, test_size = 0.3) clf = RandomForestClassifier(max_depth = 30, min_samples_split=2, n_estimators = 200, random_state = 1) #training the model clf.fit(train[columns], train["churn"]) #testing the model predictions = clf.predict(test[columns]) print(predictions) print(roc_auc_score(predictions, test["churn"]))