Algorithms for pattern recognition

Basic Supervised Learning Algorithm

No comments

Discriminant function analysis is a statistical analysis to predict a categorical dependent variable (called a grouping variable) by one or more continuous or binary independent variables (called predictor variables). Discriminant analysis works by creating one or more linear combinations of predictors, creating a new latent variable for each function. These functions are called discriminant functions. - Wikipedia.
Supervised Learning
Let us consider D is a discriminant function. Every class must be having some discriminant function.
Steps to predict the class:
  • For given test samples extract vector f.
  • Evaluate Di(f) for 1 ≤ i ≤ k.
  • The class which is predicted is the class with highest D(f) value.

Let us see small pseudo-code for taking decision and applying learning rule

Initialize the coefficients randomly.
while( ! converged ){
      for every training sample{
            predict class ( say j )
            let actual class j'
            if(j==j')
                  Do Nothing
            else
                  apply learning rule and increment error
      }
      check for convergence
}

Let us see simple MATLAB code to classify the flowers in IRIS dataset
load fisheriris;
gscatter(meas(:,1), meas(:,2), species,'rgb','osd');
xlabel('Sepal length');
ylabel('Sepal width');
We'll explore the code in other tutorial (Basic Classification using MATLAB).
The output of this MATLAB code shows how the data from dataset is classified as different flowers.

No comments :

Post a Comment