Questions tagged [naivebayes]

Naive Bayes is a popular (baseline) method for text-classification.

1035 questions
-2
votes
1 answer

How to match test columns with train data?

Getting an error while trying to use naive bayes. from sklearn.naive_bayes import GaussianNB import pandas as pd df = pd.read_csv('https://raw.githubusercontent.com/sjwhitworth/golearn/master/examples/datasets/tennis.csv') X_train =…
shantanuo
  • 31,689
  • 78
  • 245
  • 403
-2
votes
3 answers

How to build a text classifier for words?

I am trying to classify a large number of words into 5 categories. Examples of classes and strings for each class include: invoice-Number : "inv123","in12","123" invoice-Date : "22/09/1994","22-Mon-16" vendor-Name : "samplevendorname" email …
-2
votes
1 answer

How to classify matrices (or data sets)

Given a classification problem, the training data looks as follows: input - output -------------- A 100 B 150 C 170 .............. where A,B,C are big data sets, each with 6 variables and around 5000 rows. The problem is: how do…
-2
votes
1 answer

Naive bayes classification for NO text-classification

Modelling the feature space for a text document is quite easy.For example, I can take every word from a text (training data) as a feature.If a particular word (e.g. "dog") encounters multiple times in (classified) training examples (e.g. classified…
-2
votes
1 answer

NaiveBayes Classification in NLTK using python

I have the following datasets... dataset I have load the data using this 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) Now, I am trying to do this... classifier =…
Hanson
  • 35
  • 4
-2
votes
3 answers

R - How to add columns to a dataset incrementally using a loop?

I'm trying to get the error rates for a Naive Bayes classifier, by adding in each variable incrementally. For example I have 25 variables in my dataset. I want to get the error rates of the model as I add in one variable at a time. So you know it…
Eoin
  • 330
  • 1
  • 3
  • 15
-2
votes
1 answer

Making prediction whether user will be able to solve a thing or not

I have 3 datasets in csv problem.csv with attributes: id level accuracy solved_count error_count tag1 tag2 tag3 tag4 tag5 Submission.csv with attibutes: user_id problem_id solved_status user.csv with user_id solved_count attempts I want to now…
-3
votes
1 answer

ValueError: could not convert string to float: 'Pregnancies'

def loadCsv(filename): lines = csv.reader(open('diabetes.csv')) dataset = list(lines) for i in range(len(dataset)): dataset[i] = [float(x) for x in dataset[i] return dataset Hello, I'm trying to implement Naive-Bayes but its…
Salman Khan
  • 1
  • 1
  • 2
-3
votes
1 answer

Naive Bayes 2-class classification, subscript out of bounds

There are two data frames: trainReady(288obs.) and testReady(112obs.). These data frames contains 55 attributes (54 continuous and 1 binary, class attribute). I have already discretized those 54 attributes to 10 divisions, levels (with equal number…
Czarek
  • 689
  • 9
  • 20
-3
votes
1 answer

usage of naive bayes Model for prediction

Hi all I am new to scala and spark MLIB. I have a dataset of diseses of diseases along with the symptoms which are in the following format: Disease,symptom1 symptom2 symptom3 I have almost 300 entries which are in the above mentioned format in a CSV…
Sandeep Dvs
  • 147
  • 1
  • 4
  • 11
-5
votes
1 answer

Does Naive Bayes algorithm classify words or phrases?

I want to use the Naive Bayes algorithm available on Text blob package in python. Does it classify "I love terrorism and I hate peace" and "I love peace and hate terrorism" the same way?
-5
votes
1 answer

What representation of chat text data should I use for user classification?

I'm trying to train a classifier to classify text from a chat between 2 users so later on I can predict who of the two users is more likely to say X sentence/word. To get there I mined the text from the chat log and ended up with two arrays of…
xgrimau
  • 664
  • 8
  • 19
-5
votes
3 answers

What does "Naive" Bayes mean in Machine learning?

What does "Naive" Bayes mean in Machine learning?
haguki-taro
  • 1,001
  • 1
  • 8
  • 6
-7
votes
1 answer

Training and Testing Data set for classification text file

Suppose we have 10000 text file and We would like to classify as political ,health,weather,sports,Science ,Education,......... I need training data set for classification of text documents and I am Naive Bayes classification Algorithm. Anyone can…
1 2 3
68
69