scaling

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Scale

func Scale(x, u, s []float64) ([]float64, error)

Scale scales a single feature vector with given scaling parameters.

Types

type FeatureScaler

type FeatureScaler interface {
	// Scale scales a design matrix.
	Scale([][]float64) (Result, error)
}

FeatureScaler is the interface that wraps the basic Scale method.

func NewScaler

NewScaler returns a new scaler. If unsupported FeatureScalingTechnique is passed, an error is returned.

type Result

type Result struct {
	X [][]float64
	U []float64
	S []float64
}

Result holds the scaled features set along with the scaling parameters.

type ScalerFunc

type ScalerFunc func([][]float64) (Result, error)

ScalerFunc is an adapter to allow the use of plain functions as scalers.

func (ScalerFunc) Scale

func (f ScalerFunc) Scale(x [][]float64) (Result, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL