Random Forest using Scikit-Learn
๐๐๐ง๐๐จ๐ฆ ๐ ๐จ๐ซ๐๐ฌ๐ญ is a supervised machine learning algorithm which has been used for a classification task in this example. It uses multiple decision trees and takes a majority vote on them to reach a single decision. ๐๐๐ง๐๐จ๐ฆ ๐ ๐จ๐ซ๐๐ฌ๐ญ is an ๐๐๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐ method. I used ๐๐ฒ๐ฐ๐ผ๐ป๐ฑ๐ฎ๐ฟ๐_๐บ๐๐๐ต๐ฟ๐ผ๐ผ๐บ_๐ฑ๐ฎ๐๐ฎ๐๐ฒ๐.๐ฐ๐๐ for this example. The dataset is available in the repository. This dataset contains two types of mushrooms: ๐ฒ๐ฑ๐ถ๐ฏ๐น๐ฒ & ๐ฝ๐ผ๐ถ๐๐ผ๐ป๐ผ๐๐. It has 20 features. But, 9 of them contain null values and I dropped them before fitting the dataset to the model. I used 5 trees to train the ๐ฅ๐ฎ๐ป๐ฑ๐ผ๐บ ๐๐ผ๐ฟ๐ฒ๐๐ model. ๐๐ช๐ต๐๐ถ๐ฃ ๐ข๐ฅ๐ฅ๐ณ๐ฆ๐ด๐ด: https://github.com/randomaccess2023/MG2023/tree/main/Video%2061 ๐ธ๐๐๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐: 00:45 - Import required libraries 02:14 - Load ๐ฌ๐๐๐จ๐ง๐๐๐ซ๐ฒ_๐ฆ๐ฎ๐ฌ๐ก๐ซ๐จ๐จ๐ฆ_๐๐๐ญ๐๐ฌ๐๐ญ 04:38 - Drop null values 07:46 - Perform preprocessing 10:30 - Visualize selected features 15:20 - Separate features and labels 16:01 - Split the dataset 17:23 - Apply ๐๐๐ง๐๐จ๐ฆ ๐ ๐จ๐ซ๐๐ฌ๐ญ 19:26 - Plot ๐๐จ๐ง๐๐ฎ๐ฌ๐ข๐จ๐ง_๐ฆ๐๐ญ๐ซ๐ข๐ฑ 24:48 - Print ๐๐ฅ๐๐ฌ๐ฌ๐ข๐๐ข๐๐๐ญ๐ข๐จ๐ง_๐ซ๐๐ฉ๐จ๐ซ๐ญ 25:24 - Plot ๐๐๐๐ญ๐ฎ๐ซ๐ ๐ข๐ฆ๐ฉ๐จ๐ซ๐ญ๐๐ง๐๐ #datascience #machinelearning #pythonprogramming #python #jupyternotebook #jupyter #supervisedclassification #supervisedlearning #randomforest
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.