Pattern Recognition at IIT Mandi
There are 3 types of datasets given below. The details of these three datasets are:a) Linearly separable:These are 2-dimensional artificial data of 2 classes that are linearly separable. Each class has 1000 data points.
b) Non-linearly separable: These are 2-dimensional artificial data of 2 classes that are non-linearly separable. Each class has 1000 data points.
c) Real-world: Real-world data of 3 classes. (Number of data points for class1 = 2388, class2 = 2164 & for class3 = 2291)
Perform
- Classification using Bayesian classifier (including parameter estimation and decision)
- Classification (only for the 2 artificial datasets) when you approximate the pdfs via normalized histograms (considering independence between features - thus, involving 1D histogram computations for each of the two features) In both cases, do the following: For each task, you can divide the data into training and testing parts. Build the model with the training data and evaluate its performance using the test data. A typical training testing ratio can be 80% - 20% Make a confusion matrix to show your results. For the artificial datasets, also show a 2D scatter plot for the training data and test data with different colours. Also, points for different classes should also be shown in different colours.
SOLUTION
(a)
Boundary Plot of Linearly Separable data using Bayesian Classifier
Boundary Plot of Linearly Separable data using Normalised Histograms
(b)
Boundary Plot of Non-Linearly Separable data using Bayesian Classifier
Boundary Plot of Non-Linearly Separable data using Normalised Histograms
(c)
Boundary Plot of Real-world data using Bayesian Classifier
Boundary Plot of Real-world data using Normalised Histograms
Classification and Segmentation with clustering You have to perform the given tasks:a) For the dataset of Assignment 1, perform classification using k-means clustering for the non-linearly separable case.
b) Perform k-means clustering-based segmentation of the given image.
I) When using only pixel colour values as features
II) When using both pixel colour and location values as features
(In both cases, display the segmentation output as a colour image, with different colours assigned pixels belonging to different clusters, and same colours assigned to pixels belonging to the same cluster)
SOLUTION
(a) Classification of Non-linearly seprable data with K-Means Clustering
Accuracy of Test-data = 0.935
(b) K-Means Clustering based Segmentation of the given image
(I) When using only pixel colour values as features
(II) When using both Pixel colour and Location as features
Build Bayes classifier using GMM for the given data a) Non-Linearly Separable data of assignment 1 b) Another set of non-seperable data (with 2000 points in each class)SOLUTION
(a) GMM CLustering for classification of Non-linearly separable data
Classification Accuracy = 100.00 %
(b) GMM Clustering for classification of Non-Linearly separable data with 2000 points in each class
Classification Accuracy = 100.00 %
In this assignment, two types of datasets are given: 1. Linearly separable data 2. Non-linearly separable data For both of the datasets, perform classification using: 1. Perceptron 2. Multi-layer perceptron 3. SVM You can use inbuilt functions for SVM only. Take the train-test ratio as 70-30. Also find out the confusion matrix and compare the performance of each classifier. Also plot the decision boundaries in each case.SOLUTION
(1) Perceptron Decision Boundary
Linearly-Separable Data
Non-Linearly Separable Data
(2) SVM Decision Boundary
Linearly-Separable Data
Non-linearly Separable Data
(3) MLP Decision Boundary
Linearly-Separable Data
Non-Linearly Separable Data