Documentation ¶
Index ¶
- Variables
- type BayesClassifier
- func (classifier *BayesClassifier) BayesProbabilityOf(category string, features ...string) float64
- func (classifier *BayesClassifier) Classify(features ...string) string
- func (classifier *BayesClassifier) MolecularProbabilityOf(features ...string) []Classification
- func (classifier *BayesClassifier) ProbabilityOf(features ...string) []Classification
- type Classification
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 ¶
Click to show internal directories.
Click to hide internal directories.