ridge

package module
v0.0.0-...-84766bc Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2016 License: Apache-2.0 Imports: 4 Imported by: 22

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

Variables

This section is empty.

Functions

This section is empty.

Types

type RidgeRegression

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

func New

func New(x *mat64.Dense, y *mat64.Vector, 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