bayes

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Json

type Json map[string]interface{}

type NaiveBayes

type NaiveBayes struct {
	Train *NaiveBayes
	Test  *NaiveBayes
	// contains filtered or unexported fields
}

func ParseObject

func ParseObject(obj [][]string) *NaiveBayes

func ParseString

func ParseString(str string) *NaiveBayes

func (*NaiveBayes) Build

func (b *NaiveBayes) Build()

func (*NaiveBayes) DecisionTree

func (b *NaiveBayes) DecisionTree(show bool) Json

func (*NaiveBayes) Filter

func (b *NaiveBayes) Filter(col, val string) *NaiveBayes

func (*NaiveBayes) GetClassEntrophy

func (b *NaiveBayes) GetClassEntrophy()

func (*NaiveBayes) GetRoot

func (b *NaiveBayes) GetRoot() (col string)

func (*NaiveBayes) Predict

func (b *NaiveBayes) Predict(data []string) string

func (*NaiveBayes) PredictAppend

func (b *NaiveBayes) PredictAppend(data []string)

func (*NaiveBayes) SetClassifier

func (b *NaiveBayes) SetClassifier(c string)

func (*NaiveBayes) ShowClassEntrophy

func (b *NaiveBayes) ShowClassEntrophy()

func (*NaiveBayes) ShowEntrophy

func (b *NaiveBayes) ShowEntrophy(model string) (ent float64, sVal int, sDiv int)

func (*NaiveBayes) ShowGains

func (b *NaiveBayes) ShowGains() (col string, vals []string)

func (*NaiveBayes) ShowTable

func (b *NaiveBayes) ShowTable(model string)

func (*NaiveBayes) ShowTables

func (b *NaiveBayes) ShowTables()

func (*NaiveBayes) Smooth

func (b *NaiveBayes) Smooth(num int)

func (*NaiveBayes) SplitTrainData

func (b *NaiveBayes) SplitTrainData(idx []int)

Jump to

Keyboard shortcuts

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