Skip to content

This MATLAB code tests if given set of points are linearly separable using Linear Perceptron. Linear Perceptron is guaranteed to find a solution if one exists. This approach is not efficient for large dimensions. Computationally the most effective way to decide whether two sets of points are linearly separable is by applying linear programming.

License

Notifications You must be signed in to change notification settings

rishirdua/linear-separability-matlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linear Separability Test in MATLAB

This MATLAB code tests if given set of points are linearly separable using Linear Perceptron. Linear Perceptron is guaranteed to find a solution if one exists. This approach is not efficient for large dimensions. Computationally the most effective way to decide whether two sets of points are linearly separable is by applying linear programming.

Other solutions:

Author

Rishi Dua rishirdua@gmail.com

Using the code

  • The example uses libsvm format. If you need to use it for some other format, replace the variables Xtrain and Ytrain. Ytrain must be a (m x 1) matrix consisting of -1 and +1. Xtrain must be an (m x n) matrix. libsvm format is explained in http://www.csie.ntu.edu.tw/~cjlin/libsvm/
  • Bias term is added automatically.
  • The code calls data inseparable if 'maxiter' (default 10000) iterations have been reached. Change it in the code if required.

Contribute

License

This project is licensed under the terms of the MIT license. See LICENCE.txt for details

About

This MATLAB code tests if given set of points are linearly separable using Linear Perceptron. Linear Perceptron is guaranteed to find a solution if one exists. This approach is not efficient for large dimensions. Computationally the most effective way to decide whether two sets of points are linearly separable is by applying linear programming.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages