dist

package
v0.0.0-...-b15e453 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Distribution

type Distribution interface {
	CDF(x float64) float64
	GetParams() Params
	GetName() string
	SetParams(slope, intercept float64)
	TransformX(x float64) float64
	TransformY(y float64) float64
}

Distribution represents an extreme value distribution. There are six implementations: FréchetMax/Min, GumbelMax/Min and WeibullMax/Min.

type Params

type Params map[string]float64

Params maps the names of distribution parameters to their values.

type WeibullMax

type WeibullMax struct {
	Loc   float64
	Scale float64
	Shape float64
}

WeibullMax represents a Weibull Maximum distribution.

func (WeibullMax) CDF

func (w WeibullMax) CDF(x float64) float64

CDF computes the value of the cumulative density function at x.

func (WeibullMax) GetName

func (w WeibullMax) GetName() string

GetName returns the name of the distribution.

func (WeibullMax) GetParams

func (w WeibullMax) GetParams() Params

GetParams returns parameters map.

func (*WeibullMax) SetParams

func (w *WeibullMax) SetParams(slope, intercept float64)

SetParams calculates, sets and returns distribution parameters from linear regression parameters.

func (WeibullMax) TransformX

func (w WeibullMax) TransformX(x float64) float64

TransformX computes an x-axis linearization.

func (WeibullMax) TransformY

func (WeibullMax) TransformY(y float64) float64

TransformY computes an y-axis linearization.

type WeibullMin

type WeibullMin struct {
	Loc   float64
	Scale float64
	Shape float64
}

WeibullMin represents a Weibull Minimum distribution.

func (WeibullMin) CDF

func (w WeibullMin) CDF(x float64) float64

CDF computes the value of the cumulative density function at x.

func (WeibullMin) GetName

func (w WeibullMin) GetName() string

GetName returns the name of the distribution.

func (WeibullMin) GetParams

func (w WeibullMin) GetParams() Params

GetParams returns parameters map.

func (*WeibullMin) SetParams

func (w *WeibullMin) SetParams(slope, intercept float64)

SetParams calculates and sets distribution parameters from linear regression parameters.

func (WeibullMin) TransformX

func (w WeibullMin) TransformX(x float64) float64

TransformX computes an x-axis linearization.

func (WeibullMin) TransformY

func (WeibullMin) TransformY(y float64) float64

TransformY computes an y-axis linearization.

Jump to

Keyboard shortcuts

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