MCPcopy Index your code
hub / github.com/Giyn/DataMiningVisualizationSystem / NBayesTraining

Function NBayesTraining

App/ModelManager.py:90–104  ·  view source on GitHub ↗
(x, y, textColumns)

Source from the content-addressed store, hash-verified

88 return model, ssler
89
90def NBayesTraining(x, y, textColumns) :
91
92 model = NaiveBayesClassifier()
93
94 ssler = TextAnalyzer()
95
96 ssler.fit(x, textColumns)
97
98 x = ssler.transform(x, textColumns)
99
100 model.fit(x, y)
101
102 print((model.predict(x) == y).sum() / len(y))
103
104 return model, ssler
105

Callers 1

fitFunction · 0.85

Calls 6

fitMethod · 0.95
transformMethod · 0.95
fitMethod · 0.95
predictMethod · 0.95
TextAnalyzerClass · 0.85

Tested by

no test coverage detected