mlgo

package module
v0.0.0-...-9bff13d Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2015 License: LGPL-3.0 Imports: 1 Imported by: 2

README

mlgo

This is not my own work and was automatically exported from google code (pending closure)

Automatically exported from code.google.com/p/mlgo

The original project was licenced LGPL, which means that it also applies to this repo.

Documentation

Index

Constants

View Source
const (
	MaxValue = math.MaxFloat64
)

Variables

This section is empty.

Functions

func ApproximatelyEqual

func ApproximatelyEqual(a, b, epsilon float64) bool

func DefinitelyGreaterThan

func DefinitelyGreaterThan(a, b, epsilon float64) bool

func DefinitelyLessThan

func DefinitelyLessThan(a, b, epsilon float64) bool

func EssentiallyEqual

func EssentiallyEqual(a, b, epsilon float64) bool

func Range

func Range(start, end int) (x []int)

Types

type Matrix

type Matrix [][]float64

this definition creates problem in client program defining Matrix and Vector i.e. mlgo.Vector != Vector type Matrix []Vector

func CopyMatrix

func CopyMatrix(Y [][]float64) (X Matrix)

CopyMatrix returns a Matrix filled with content from Y

func (Matrix) Copied

func (X Matrix) Copied() (Y Matrix)

Copied returns a copy of the Matrix.

func (Matrix) Equal

func (X Matrix) Equal(Y Matrix) bool

func (Matrix) Len

func (X Matrix) Len() int

func (Matrix) Less

func (X Matrix) Less(i, j int) bool

Less returns whether row i is lexicographically less than row j

func (Matrix) Slice

func (X Matrix) Slice(idx []int) (Y Matrix)

func (Matrix) Summarize

func (X Matrix) Summarize() (means, variances Vector)

func (Matrix) Swap

func (X Matrix) Swap(i, j int)

type Summary

type Summary struct {
	Mean, N, Min, Max float64
	// contains filtered or unexported fields
}

func (*Summary) Add

func (s *Summary) Add(x float64)

Add accumulates running statistics for calculating variance and standard deviation using the Welford method (1962)

func (*Summary) AddValues

func (s *Summary) AddValues(x []float64)

func (*Summary) Range

func (s *Summary) Range() (r float64)

Range returns the range of the data

func (*Summary) Sd

func (s *Summary) Sd() (v float64)

Sd returns the sample standard deviation

func (*Summary) SdP

func (s *Summary) SdP() (v float64)

SdP returns the population standard deviation

func (*Summary) Var

func (s *Summary) Var() (v float64)

Var returns the sample variance

func (*Summary) VarP

func (s *Summary) VarP() (v float64)

VarP returns the population variance

type Vector

type Vector []float64

func NewVector

func NewVector(m int, v float64) (x Vector)

func (Vector) Equal

func (x Vector) Equal(y Vector) bool

func (Vector) Mean

func (x Vector) Mean() (m float64)

func (Vector) Reordered

func (x Vector) Reordered(index []int) (y Vector)

func (Vector) Summarize

func (x Vector) Summarize() (mean, variance float64)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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