Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 1.04 KB

File metadata and controls

13 lines (7 loc) · 1.04 KB

linear-discriminant-analysis-iris-dataset

Principal component analysis (PCA) and linear disciminant analysis (LDA) are two data preprocessing linear transformation techniques that are often used for dimensionality reduction in order to select relevant features that can be used in the final machine learning algorithm.

PCA is an unsupervised algorithm that is used for feature extraction in high-dimensional and correlated data. PCA achieves dimensionality reduction by transforming features into orthogonal component axes of maximum variance in a dataset. An implementation of PCA using iris dataset can be found here: https://github.com/bot13956/principal_component_analysis_iris_dataset

The goal of LDA is to find the feature subspace that optimizes class separability. Hence, LDA is a supervised algorithm. In this code, we illustrate the implementation of LDA using the iris dataset.

iris.data.csv: iris dataset

LDA_irisdataset.ipynb: notebook file containing implementation of LDA

LDA_irisdataset.py: python script containing implementation of LDA