Ho–Kashyap algorithm


The Ho–Kashyap algorithm is an iterative method in machine learning for finding a linear decision boundary that separates two linearly separable classes. It was developed by Yu-Chi Ho and Rangasami L. Kashyap in 1965, and usually presented as a problem in linear programming.

Setup

Given a training set consisting of samples from two classes, the Ho–Kashyap algorithm seeks to find a weight vector and a margin vector such that:
where is the augmented data matrix with samples from both classes, is the weight vector to be determined, and is a positive margin vector.
The algorithm minimizes the criterion function:
subject to the constraint that .
Given a problem of linearly separating two classes, we consider a dataset of elements where. Linearly separating them by a perceptron is equivalent to finding weight and bias for a perceptron, such that:

Algorithm

The idea of the Ho–Kashyap algorithm is as follows:
  • Given any, the corresponding is known: It is simply, where denotes the Moore–Penrose pseudoinverse of.
  • Therefore, it only remains to find by gradient descent.
  • However, the gradient descent may sometimes decrease some of the coordinates of, which may cause some coordinates of to become negative, which is undesirable. Therefore, whenever some coordinates of would have decreased, those coordinates are unchanged instead. As for the coordinates of that would increase, those would increase without issue.
Formally, the algorithm is as follows:
  1. Initialization: Set to an arbitrary positive vector, typically . Set the iteration counter. Set
  2. Loop until convergence, or until iteration counter exceeds some.
  3. # Error calculation: Compute the error vector:.
  4. # Margin update: Update the margin vector: where is a positive learning rate parameter, and denotes the element-wise absolute value.
  5. # Weight calculation: Compute the weight vector using the pseudoinverse:.
  6. # Convergence check: If for some predetermined threshold, then return.
  7. # if, return "Samples not separable.".
  8. Return "Algorithm failed to converge in time.".

Properties

Relationship to other algorithms

Variants

Modified Ho–Kashyap algorithm changes weight calculation step to.
Kernel Ho–Kashyap algorithm: Applies kernel methods to the Ho–Kashyap framework to enable non-linear classification by implicitly mapping data to a higher-dimensional feature space.