classifier

package
v1.4.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var K = 1e3
View Source
var VERSION = "1.0.0"

Functions

This section is empty.

Types

type BayesClassifier

type BayesClassifier struct {
	Brain *brain.BayesBrain
}

func (*BayesClassifier) BayesProbabilityOf

func (classifier *BayesClassifier) BayesProbabilityOf(category string, features ...string) float64

P(category|features...) 朴素贝叶斯计算特征数据属于某个类别的概率

func (*BayesClassifier) Classify

func (classifier *BayesClassifier) Classify(features ...string) string

func (*BayesClassifier) MolecularProbabilityOf added in v1.2.4

func (classifier *BayesClassifier) MolecularProbabilityOf(features ...string) []Classification

func (*BayesClassifier) ProbabilityOf

func (classifier *BayesClassifier) ProbabilityOf(features ...string) []Classification

type Classification

type Classification struct {
	Category    string
	Features    []string
	Probability float64
}

Jump to

Keyboard shortcuts

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