Back to Browse

Random Forest using Scikit-Learn

201 views
Jul 16, 2024
30:01

๐‘๐š๐ง๐๐จ๐ฆ ๐…๐จ๐ซ๐ž๐ฌ๐ญ 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 formats

Video Formats

360pmp439.9 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Random Forest using Scikit-Learn | NatokHD