| Algorithm::KernelKMeans::Util |
centroid($cluster)generate_gaussian_kernel($sigma)
Algorithm::KernelKMeans::Util
This module provides some utility functions suitable to use with Algorithm::KernelKMeans.
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.
Calculates inner product of $v and $u.
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)
K(x1, x2) = tanh($s * (x1 . x2) + $theta)
Koichi SATOH <r.sekia@gmail.com>
| Algorithm::KernelKMeans::Util |