问题
Just wondering can I implement NavieBayes algorithm in C#? I just want to calculate the precision, TP-rate, FP-rate etc using Navie Bayes algorithm in C#.
I just calculate mean and standard deviation for my dataset using SQL logic
SELECT state, AVG([v2o] * 1.0) FROM portability WHERE state = 'Queensland' GROUP BY state
and
SELECT state, STDEV([v2o] * 1.0) FROM portability WHERE state = 'Queensland' GROUP BY state
Can anyone tell me how can I implement Navie Bayes algorithm.
For instance lets consider the below dataset as example
Can anyone tell me the logic to implement Navie Bayes for the above dataset?
回答1:
Check the Accord.net library. It has an implementation of the Naive Bayes algorithm that you can use.
来源:https://stackoverflow.com/questions/15132205/implementing-naviebayes-in-c-sharp