Decision Tree using Scikit-Learn
Vložit
- čas přidán 11. 09. 2024
- 𝐃𝐞𝐜𝐢𝐬𝐢𝐨𝐧 𝐓𝐫𝐞𝐞 is a supervised machine learning algorithm which has been used for a classification task in this example. It is a tree-like model of decisions and their possible consequences. It is a machine learning algorithm that makes predictions based on how a previous set of questions was answered.
I used 𝘄𝗵𝗲𝗮𝘁_𝘀𝗲𝗲𝗱.𝗰𝘀𝘃 dataset for this example. The dataset is available in the repository. This dataset contains three varieties of wheat seed: 𝗞𝗮𝗺𝗮, 𝗥𝗼𝘀𝗮 & 𝗖𝗮𝗻𝗮𝗱𝗶𝗮𝗻.
𝙄𝙢𝙥𝙤𝙧𝙩𝙖𝙣𝙩 𝙩𝙞𝙢𝙚𝙨𝙩𝙖𝙢𝙥𝙨:
00:43 - Import required libraries
02:14 - Load 𝘄𝗵𝗲𝗮𝘁_𝘀𝗲𝗲𝗱 dataset
04:21 - Visualize selected features
08:38 - Separate features and labels
09:19 - Split the dataset
10:40 - Apply 𝗗𝗲𝗰𝗶𝘀𝗶𝗼𝗻 𝗧𝗿𝗲𝗲
12:09 - Plot 𝗰𝗼𝗻𝗳𝘂𝘀𝗶𝗼𝗻_𝗺𝗮𝘁𝗿𝗶𝘅
17:48 - Print 𝗰𝗹𝗮𝘀𝘀𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻_𝗿𝗲𝗽𝗼𝗿𝘁
18:26 - Plot 𝗗𝗲𝗰𝗶𝘀𝗶𝗼𝗻 𝗧𝗿𝗲𝗲
23:25 - Plot 𝗳𝗲𝗮𝘁𝘂𝗿𝗲 𝗶𝗺𝗽𝗼𝗿𝘁𝗮𝗻𝗰𝗲
𝑮𝒊𝒕𝑯𝒖𝒃 𝒂𝒅𝒅𝒓𝒆𝒔𝒔: github.com/ran...
#machinelearning #datascience #wheatseeddataset #pythonprogramming #python #jupyternotebook #decisiontree #supervisedclassification #supervisedlearning