testfeatselect

package
v0.0.0-...-8fdc90a Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExampleAllModelsWrong

func GetExampleAllModelsWrong() (*mat.Dense, []float64)

GetExampleAllModelsWrong returns a dataset where none of the possible models fits the data

func GetExampleXY

func GetExampleXY() (*mat.Dense, []float64)

GetExampleXY returns an example set used for testing

Types

type DemoSet

type DemoSet func() (*mat.Dense, []float64)

DemoSet is a function type for functions that returns a design matrix and a slice with target values

type MockCohenTarget

type MockCohenTarget struct {
	Mode int
}

MockCohenTarget implements the CohenTarget interface

func (*MockCohenTarget) GetSelection

func (m *MockCohenTarget) GetSelection(indices []int) []int

GetSelection returns a selection

func (*MockCohenTarget) GetX

func (m *MockCohenTarget) GetX() mat.Matrix

GetX returns an empety matrix

func (*MockCohenTarget) HyperParameters

func (m *MockCohenTarget) HyperParameters() map[string]float64

HyperParameters returns a map with the hyper parameters

func (*MockCohenTarget) StringRep

func (m *MockCohenTarget) StringRep() string

StringRep returns a string representation of the hyper parameters

type OmpTest

type OmpTest struct {
	Name        string
	Target      []float64
	X           *mat.Dense
	ExpectOrder []int
	ExpectCoeff []float64
}

OmpTest is a structure for holding nessecary data for testing orthogonal matchin pursuit

func Exponentials

func Exponentials(x []float64) *OmpTest

Exponentials return a test case with a sum of exponential functions with different decay rates

func LinearCubic

func LinearCubic(x []float64) *OmpTest

LinearCubic creates a test case where the target function is a straight line and the desigin matrix contains features up to cubic order

Jump to

Keyboard shortcuts

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