Documentation ¶
Index ¶
- func EuclideanDistance(x1, x2, y1, y2 float64) float64
- func Knn(in []float64, x, y, classifier []float64, k int, ...) float64
- func ManhattanDistance(x1, x2, y1, y2 float64) float64
- func Maximum(in []float64) (out float64)
- func Mean(in []float64) (out float64)
- func Median(in []float64) (out float64)
- func MinMaxScale(in []float64)
- func Minimum(in []float64) (out float64)
- func Mode(in []float64) (out float64)
- func Range(in []float64) (out float64)
- func Replace(in []float64, before, after float64)
- func StandardDeviation(in []float64) (out float64)
- func StandardScale(in []float64)
- func Variance(in []float64) (out float64)
- type Pieces
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EuclideanDistance ¶
EuclideanDistance ...
func Knn ¶
func Knn(in []float64, x, y, classifier []float64, k int, distanceFn func(x1, x2, y1, y2 float64) float64) float64
Knn ...
func ManhattanDistance ¶
ManhattanDistance ...
func MinMaxScale ¶
func MinMaxScale(in []float64)
MinMaxScale (Normalization) scales the values down to a value between 0 and 1.
func StandardDeviation ¶
StandardDeviation measures how spread out numbers are. A higher value means more spread out numbers.
func StandardScale ¶
func StandardScale(in []float64)
StandardScale (Standardization) scales the values down to a value between Mean(0) and Standard Deviation (1).
Types ¶
type Pieces ¶
type Pieces struct {
// contains filtered or unexported fields
}
Pieces offers concurrent access to each of goroutine during apply state.
func (*Pieces) SplitApplyCombine ¶
func (p *Pieces) SplitApplyCombine(in []float64, apply func(in []float64) (out float64), combine func(in []float64) (out float64)) (out float64)
SplitApplyCombine break up a slice of float64 data into smaller pieces (split), operate on each piece independently by a goroutine (apply) and put all the pieces back together (combine).
Click to show internal directories.
Click to hide internal directories.