NAME
Algorithm::KernelKMeans::Util
DESCRIPTION
This module provides some utility functions suitable to use with Algorithm::KernelKMeans
.
FUNCTIONS
This module exports nothing by default. You can import
functions below:
centroid($cluster)
Takes array ref of vertices and returns centroid vector of the cluster.
inner_product($v, $u)
Calculates inner product of $v
and $u
.
generate_polynominal_kernel($l, $p)
Generates a polynominal kernel function and returns it.
Generated kernel function will be formed K(x1, x2) = ($l + x1 . x2)^$p, where "x1 . x2" represents inner product
.
generate_gaussian_kernel($sigma)
K(x1, x2) = exp(-||x1 - x2||^2 / (2 * $sigma)^2)
generate_sigmoid_kernel($s, $theta)
K(x1, x2) = tanh($s * (x1 . x2) + $theta)
AUTHOR
Koichi SATOH <r.sekia@gmail.com>