Documentation ¶
Index ¶
- Constants
- func NewAlgo(conf Conf, space core.Space, data []core.Elemt) *core.Algo
- type Conf
- type Impl
- func (impl *Impl) AddCenter(cluster core.Elemt, distance float64)
- func (impl *Impl) AddOutlier(outlier core.Elemt)
- func (impl *Impl) Copy(model core.OCModel) (core.Impl, error)
- func (impl *Impl) GetClusters() core.Clust
- func (impl *Impl) GetMaxDistance() float64
- func (impl *Impl) GetRelativeDistance(distance float64) float64
- func (impl *Impl) Init(model core.OCModel) (clust core.Clust, err error)
- func (impl *Impl) Iterate(model core.OCModel) (clust core.Clust, runtimeFigures core.RuntimeFigures, err error)
- func (impl *Impl) Process(elemt core.Elemt, space core.Space)
- func (impl *Impl) Push(elemt core.Elemt, model core.OCModel) (err error)
- func (impl *Impl) UpdateCenter(label int, elemt core.Elemt, distance float64, space core.Space)
- func (impl *Impl) UpdateMaxDistance(distance float64)
Constants ¶
View Source
const (
// MaxDistance is the max distance of streaming
MaxDistance = "maxDistance"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conf ¶
type Conf struct { core.CtrlConf BufferSize int Mu float64 Sigma float64 OutRatio float64 OutAfter int RGen *rand.Rand }
Conf represents the cofiguration of a streaming algorithm.
func (*Conf) SetDefaultValues ¶ added in v0.2.0
func (conf *Conf) SetDefaultValues()
SetDefaultValues applies default values to the given configuration.
type Impl ¶
type Impl struct {
// contains filtered or unexported fields
}
Impl represents the implementation of the streaming clustering algorithm.
func (*Impl) AddOutlier ¶
AddOutlier adds an outlier.
func (*Impl) GetClusters ¶
GetClusters returns the current cluster centers.
func (*Impl) GetMaxDistance ¶
GetMaxDistance returns the maximal distance between two clusters
func (*Impl) GetRelativeDistance ¶
GetRelativeDistance returns the ratio of given distance with the maximal distance if less than 1, otherwise 1.
func (*Impl) Iterate ¶
func (impl *Impl) Iterate(model core.OCModel) (clust core.Clust, runtimeFigures core.RuntimeFigures, err error)
Iterate runs the streaming algorithm.
func (*Impl) UpdateCenter ¶
UpdateCenter modifies an existing center.
func (*Impl) UpdateMaxDistance ¶
UpdateMaxDistance changes the maximal distance between two clusters
Click to show internal directories.
Click to hide internal directories.