dh

package
v0.0.0-...-4977366 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Discretise

func Discretise(d [][]float64, bins []int, min, max []float64) [][]int

Discretise takes a two-dimensional slice and discretises it. Min/max and number of bins must be provided for each column. The first index of the data are the rows and the second index the columns, i.e., d[r][c] is the data point in the r-th row and c-th column

func DiscretiseVector

func DiscretiseVector(d []float64, bins int, min, max float64) []int

DiscretiseVector takes a one-dimensional slice and discretises it. Min/max and number of bins must be provided.

func ExtractColumns

func ExtractColumns(data [][]float64, indices []int) [][]float64

ExtractColumns [...]

func GetMinMax

func GetMinMax(data [][]float64) ([]float64, []float64)

GetMinMax get the minimum and maximum values The return value are two arrays. The number of elements corresponds to the number of columns in the data. The first array contains the minimum values. The second array contains the minimum values.

func MakeUnivariate

func MakeUnivariate(d [][]int, bins []int) []int

MakeUnivariate takes a two-dimensional discretised slice and returns a one-dimensional representation of it.

func MakeUnivariateRelabelled

func MakeUnivariateRelabelled(d [][]int, bins []int) []int

MakeUnivariateRelabelled takes a two-dimensional discretised slice and returns a one-dimensional representation of it.

func ReadData

func ReadData(filename string) (r [][]float64)

ReadData [...]

func Relabel

func Relabel(d []int) []int

Relabel takes a one-dimensional discretised slice and returns a one-dimensional representation of it, in which only consecutive values, i.e., [1,7,10,15] will be converted into [0,1,2,3]

Types

This section is empty.

Jump to

Keyboard shortcuts

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