Skip to content

[source]

Manhattan#

A distance metric that constrains movement to horizontal and vertical, similar to navigating the city blocks of Manhattan. An example of a board game that uses this type of movement is Checkers.

Manhattan(a,b)=ab1=i=1n|aibi|

Data Type Compatibility: Continuous

Parameters#

This kernel does not have any parameters.

Example#

use Rubix\ML\Kernels\Distance\Manhattan;

$kernel = new Manhattan();