nb2

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm struct {
	Data map[string]map[string]float64
	// contains filtered or unexported fields
}

Algorithm defines the basic structure

func New

func New() *Algorithm

New returns new algorithm

func (*Algorithm) Classify

func (a *Algorithm) Classify(data models.SensorData) (pl PairList, err error)

Classify will classify the specified data

func (*Algorithm) Fit

func (a *Algorithm) Fit(datas []models.SensorData) (err error)

Fit will take the data and learn it

type Pair

type Pair struct {
	Key   string
	Value float64
}

type PairList

type PairList []Pair

func (PairList) Len

func (p PairList) Len() int

func (PairList) Less

func (p PairList) Less(i, j int) bool

func (PairList) Swap

func (p PairList) Swap(i, j int)

Jump to

Keyboard shortcuts

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