classifier

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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