Documentation ¶
Index ¶
- func AIC(_n, _k int, rss float64, correction bool) float64
- func Auto(x []float64, y []float64) ([]float64, float64, error)
- func BIC(_n, _k int, rss float64) float64
- func Calculate(x []float64, w []float64) []float64
- func FixedDegree(x []float64, y []float64, d int) ([]float64, error)
- func SseSstSsr(x []float64, y []float64, w []float64) (float64, float64, float64)
- func Vandermonde(x []float64, d int) *mat.Dense
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AIC ¶
AIC is function to calculate Akaike Information Criterion of model n is number of observation k is number of model parameter, in this case, degree of polynomial model rss is residual sum of square. this can be retreived by RssSst function correction is whether to apply correction for small number of observation
func Auto ¶
Auto is to conduct polynomial regression and return optimal model based on AICc(Akaike Information Criterion) x is slice of input, y is slice of observation output is (slice of coefficient, R squared, error) slice of coefficient will have length of d + 1 if length of x and y unmatches, it will return err
func BIC ¶
BIC is function to calculate Bayesian Information Criterion of model n is number of observation k is number of model parameter, in this case, degree of polynomial model rss is residual sum of square. this can be retreived by RssSst function
func Calculate ¶
Calculate is function to calculate model value of input x is input vector, w is coefficient of polynomial regression model.
func FixedDegree ¶
FixedDegree is to conduct polynomial regression with fixed degree x is slice of input, y is slice of observation, d is degree of polynomial equation output is (slice of coefficient, error) slice of coefficient will have length of d + 1 if length of x and y unmatches, it will return err
Types ¶
This section is empty.