Answers for "random forest classifier implementation in python for beer"

1

how to use random tree in python

from sklearn.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)
Posted by: Guest on May-23-2020
1

how to use random tree in python

from sklearn import metrics

print('Mean Absolute Error:', metrics.mean_absolute_error(y_test, y_pred))
print('Mean Squared Error:', metrics.mean_squared_error(y_test, y_pred))
print('Root Mean Squared Error:', np.sqrt(metrics.mean_squared_error(y_test, y_pred)))
Posted by: Guest on May-23-2020

Code answers related to "random forest classifier implementation in python for beer"

Python Answers by Framework

Browse Popular Code Answers by Language