Machine learning kernels in Julia.


Machine Learning Kernels

Documentation Status Build Status Coverage Status


MLKernels.jl is a Julia package for Mercer kernel functions (or the covariance functions used in Gaussian processes) that are used in the kernel methods of machine learning. This package provides a flexible datatype for representing and constructing machine learning kernels as well as an efficient set of methods to compute or approximate kernel matrices. The package has no dependencies beyond base Julia.


Full documentation is available on Read the Docs.


Through the use of kernel functions, kernel-based methods may operate in a high (potentially infinite) dimensional implicit feature space without explicitly mapping data from the original feature space to the new feature space. Non-linearly separable data may be linearly separable in the transformed space. For example, the following data set is not linearly separable:

Feature Space

Using a Polynomial Kernel of degree 2, the points are mapped to a 3-dimensional space where a plane can be used to linearly separate the data:

Transformed Data

Explicitly, the Polynomial Kernel of degree 2 maps the data to a cone in 3-dimensional space. The intersecting hyperplane forms a conic section with the cone:

Transformed Data

When translated back to the original feature space, the conic section corresponds to a circle which can be used to perfectly separate the data:

Separating Hyperplane

The above plots were generated using PyPlot.jl.

First Commit


Last Touched

3 days ago


562 commits