Random forest hyperparameter tuning9/22/2023 ![]() ![]() The above image is the visualization result for the Random Forest classifier working with the training set result. Mtp.title('Random Forest Algorithm (Training set)') Mtp.scatter(x_set, x_set,Ĭ = ListedColormap(('purple', 'green'))(i), label = j) Mtp.contourf(x1, x2, classifier.predict(nm.array().T).reshape(x1.shape),Īlpha = 0.75, cmap = ListedColormap(('purple','green' ))) Test accuracy of the result (Creation of Confusion matrix)īelow is the code for the pre-processing step:įrom lors import ListedColormap.Fitting the Random forest algorithm to the Training set.By using the same dataset, we can compare the Random Forest classifier with other classification models such as Decision tree Classifier, KNN, SVM, Logistic Regression, etc. For this, we will use the same dataset "user_data.csv", which we have used in previous classification models. ![]() Now we will implement the Random Forest Algorithm tree using Python. Python Implementation of Random Forest Algorithm
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |