NaiveBayes Classification in NLTK using python
<p>I have the following datasets...
<a href="http://i.stack.imgur.com/9l9nJ.png" rel="nofollow">dataset</a></p>

<p>I have load the data using this</p>

<pre><code>import numpy as np
import pandas as pd
input_file = "C:/Users/User/Documents/R/exp.csv"
df =  pd.read_csv(input_file, header = 0)
</code></pre>

<p>Now, I am trying to do this...</p>

<pre><code>classifier = nltk.NaiveBayesClassifier.train(labeled_featuresets) 
</code></pre>

<p>How can i reach there ?</p>

<p>You can find information on NLTK and it's workings with their <a href="http://www.nltk.org/book/" rel="nofollow">online tutorial</a>.</p>

<p>Specifically, you should look into features and classifiers, both of which can be found in <a href="http://www.nltk.org/book/ch06.html" rel="nofollow">Chapter 6</a>.</p>

<p>Features are simply functions that return some value based on an input, so you can build these functions around the data format of Pandas.</p>

python nltk naivebayes