cubicSpline

package
v0.0.0-...-f5958bd Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CubicSpline

type CubicSpline func(float64) float64

CubicSpline Univariate function

type NaturalCubicSplines

type NaturalCubicSplines struct {
	// contains filtered or unexported fields
}

NaturalCubicSplines Reference from: p.141-156, T. Hastie et. al., The Elements of Statistical Learning

func NewNaturalCubicSplines

func NewNaturalCubicSplines(knots knot.Knot, coefs []float64) *NaturalCubicSplines

NewNaturalCubicSplines A new pointer of NaturalCubicSpline struct

func (*NaturalCubicSplines) At

func (ncs *NaturalCubicSplines) At(x float64) float64

At Calculate the smoothing spline at x

func (*NaturalCubicSplines) Interpolate

func (ncs *NaturalCubicSplines) Interpolate(y []float64)

Interpolate Calculate the coefficients interpolating y

func (*NaturalCubicSplines) Solve

func (ncs *NaturalCubicSplines) Solve(lambda float64)

Solve Solve the matrix needed when calculating smoothing spline.

Jump to

Keyboard shortcuts

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