ridge

package module
v0.0.0-...-d077028 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

README

ridge

GoDoc

Ridge is a Go library for running ridge regression.

Getting started

API documentation is available via godoc.

License

Copyright 2016 President and Fellows of Harvard College

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

Overview

Package ridge implements ridge regression.

Index

Constants

View Source
const BasicallyZero = 1.0e-15

BasicallyZero ...

Variables

This section is empty.

Functions

This section is empty.

Types

type RidgeRegression

type RidgeRegression struct {
	X            *mat.Dense
	XSVD         *mat.SVD
	U            *mat.Dense
	D            *mat.Dense
	V            *mat.Dense
	XScaled      *mat.Dense
	Y            *mat.VecDense
	Scales       *mat.VecDense
	L2Penalty    float64
	Coefficients *mat.VecDense
	Fitted       []float64
	Residuals    []float64
	StdErrs      []float64
}

RidgeRegression ...

func New

func New(x *mat.Dense, y *mat.VecDense, l2Penalty float64) *RidgeRegression

New returns a new ridge regression.

func (*RidgeRegression) Regress

func (r *RidgeRegression) Regress()

Regress runs the ridge regression to calculate coefficients.

Jump to

Keyboard shortcuts

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