File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,21 +20,21 @@ type Clusterer interface {
2020}
2121
2222type HardClusterer interface {
23- Clusters () ( []HardCluster , error )
23+ Guesses () []HardCluster
2424
2525 Predict (observation []float64 ) (HardCluster , error )
2626
27- Online (observations chan []float64 , done chan bool ) chan []HardCluster
27+ Online (observations chan []float64 , done chan struct {} ) chan []HardCluster
2828
2929 Clusterer
3030}
3131
3232type SoftClusterer interface {
33- Clusters () ( []* SoftCluster , error )
33+ Guesses () []* SoftCluster
3434
3535 Predict (observation []float64 ) (* SoftCluster , error )
3636
37- Online (observations chan []float64 , done chan bool ) chan []* SoftCluster
37+ Online (observations chan []float64 , done chan struct {} ) chan []* SoftCluster
3838
3939 Clusterer
4040}
Original file line number Diff line number Diff line change @@ -3,9 +3,8 @@ package clusters
33import "errors"
44
55var (
6- ErrDimensionMismatch = errors .New ("Vectors have different dimension" )
7- ErrEmptySet = errors .New ("Empty training set" )
8- ErrEmptyClusters = errors .New ("Empty clusters" )
9- ErrZeroIterations = errors .New ("Number of iterations cannot be less than 1" )
10- ErrZeroClusters = errors .New ("Number of clusters cannot be less than 1" )
6+ ErrEmptySet = errors .New ("Empty training set" )
7+ ErrNotTrained = errors .New ("You need to train the algorithm first" )
8+ ErrZeroIterations = errors .New ("Number of iterations cannot be less than 1" )
9+ ErrZeroClusters = errors .New ("Number of clusters cannot be less than 1" )
1110)
You can’t perform that action at this time.
0 commit comments