Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FeatureScaling ¶
FeatureScaling normalizes every columns with "feature scaling".
func FeatureScalingSingle ¶
FeatureScalingSingle normalizes the first row with "feature scaling".
(Usually only one row in input)
func StandardScore ¶
StandardScore normalizes every columns with "Standard Score".
func StandardScoreSingle ¶
StandardScoreSingle normalizes the first row with "Standard Score".
(usually only one row in input)
Types ¶
type CustomData ¶
type CustomData struct {
RawData Data
}
CustomData is used to call all normalization functions, and you should add your own Data to RawData.
func NewFloat64Data ¶
func NewFloat64Data(rawData [][]float64) CustomData
NewFloat64Data return a CustomData with DefaultData.
func NewFloat64DataSingle ¶
func NewFloat64DataSingle(rawData []float64) CustomData
NewFloat64DataSingle return a CustomData with DefaultData.
func (CustomData) FeatureScaling ¶
func (d CustomData) FeatureScaling() [][]float64
FeatureScaling normalizes every columns with "feature scaling".
func (CustomData) FeatureScalingSingle ¶
func (d CustomData) FeatureScalingSingle() []float64
FeatureScalingSingle normalizes the first row with "feature scaling".
(Usually only one row in input)
func (CustomData) StandardScore ¶
func (d CustomData) StandardScore() [][]float64
StandardScore normalizes every columns with "Standard Score".
func (CustomData) StandardScoreSingle ¶
func (d CustomData) StandardScoreSingle() []float64
StandardScoreSingle normalizes the first row with "Standard Score".
(usually only one row in input)
type Data ¶
Data is a interface for custom data.
You should implement Value(), RowSize(), and ColSize() for your own Data type.
type DefaultData ¶
type DefaultData struct {
RawData [][]float64
}
DefaultData is used for normal [][]float64 type, and all member functions have been implemented.
func (DefaultData) ColSize ¶
func (d DefaultData) ColSize() int
ColSize is the default ColSize() for DefaultData.
func (DefaultData) RowSize ¶
func (d DefaultData) RowSize() int
RowSize is the default RowSize() for DefaultData.
func (DefaultData) Value ¶
func (d DefaultData) Value(i, j int) float64
Value is the default Value() for DefaultData.