Documentation ¶
Overview ¶
ctrace makes Traces into ClusterableTraces which can then be used in kmeans.
Index ¶
Constants ¶
View Source
const (
// CENTROID_KEY is the name for the centroid when it appears as a trace in a DataFrame.
CENTROID_KEY = "special_centroid"
)
Variables ¶
This section is empty.
Functions ¶
func CalculateCentroid ¶
func CalculateCentroid(members []kmeans.Clusterable) kmeans.Centroid
CalculateCentroid implements kmeans.CalculateCentroid.
Types ¶
type ClusterableTrace ¶
ClusterableTrace contains Trace data and implements kmeans.Clusterable and kmeans.Centroid.
func NewFullTrace ¶
func NewFullTrace(key string, values []float32, minStdDev float32) *ClusterableTrace
NewFullTrace takes data you would find in a Trace and returns a ClusterableTrace usable for kmeans clustering.
func (*ClusterableTrace) AsClusterable ¶
func (t *ClusterableTrace) AsClusterable() kmeans.Clusterable
See kmeans.Centroid.
func (*ClusterableTrace) Distance ¶
func (t *ClusterableTrace) Distance(c kmeans.Clusterable) float64
See kmeans.Centroid.
func (*ClusterableTrace) Dup ¶
func (t *ClusterableTrace) Dup(newKey string) *ClusterableTrace
func (*ClusterableTrace) String ¶
func (t *ClusterableTrace) String() string
Click to show internal directories.
Click to hide internal directories.