𝐋𝐢𝐧𝐞𝐚𝐫 𝐃𝐢𝐬𝐜𝐫𝐢𝐦𝐢𝐧𝐚𝐧𝐭 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬 (𝐋𝐃𝐀) is a supervised machine learning algorithm. This approach is used in machine learning to solve classification problems with two or more classes. 𝐋𝐃𝐀 fits a Gaussian density to each class, assuming all classes share the same covariance matrix.
I used 𝗿𝗮𝗶𝘀𝗶𝗻.𝘅𝗹𝘀𝘅 dataset for this example. The dataset is available in the repository. It contains 2 types of raisins: 𝗞𝗲𝗰𝗶𝗺𝗲𝗻 & 𝗕𝗲𝘀𝗻𝗶.
𝑮𝒊𝒕𝑯𝒖𝒃 𝒂𝒅𝒅𝒓𝒆𝒔𝒔: https://github.com/randomaccess2023/M...
𝙄𝙢𝙥𝙤𝙧𝙩𝙖𝙣𝙩 𝙩𝙞𝙢𝙚𝙨𝙩𝙖𝙢𝙥𝙨:
00:47 - Import required libraries
01:51 - Load 𝐫𝐚𝐢𝐬𝐢𝐧 dataset
03:41 - Perform preprocessing
05:19 - Separate features and classes
05:57 - Split the dataset
07:18 - Apply 𝐋𝐢𝐧𝐞𝐚𝐫 𝐃𝐢𝐬𝐜𝐫𝐢𝐦𝐢𝐧𝐚𝐧𝐭 𝐀𝐧𝐚𝐥𝐲𝐬𝐢𝐬
11:55 - Plot 𝐜𝐨𝐧𝐟𝐮𝐬𝐢𝐨𝐧_𝐦𝐚𝐭𝐫𝐢𝐱
18:28 - Print 𝐜𝐥𝐚𝐬𝐬𝐢𝐟𝐢𝐜𝐚𝐭𝐢𝐨𝐧_𝐫𝐞𝐩𝐨𝐫𝐭
#lineardiscriminantanalysis #LDA #datascience #machinelearning #sklearn #scikitlearn #pythonprogramming #python #jupyter #jupyternotebook #raisindataset #supervisedlearning #supervisedclassification