You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Puneet Arora <ar...@gmail.com> on 2013/10/04 09:50:20 UTC
Editing Dictionary Vector Generated
Hello All,
I am currently working on sentimental analysis of social media where in I
am using mahout for vectors generation using bigrams, but while classifying
them under the category some of the unigrams which I dont want are also
coming.
Like
I classified anti English as negative
now in dictionary vector anti English is marked as negative which is fine
then
anti is marked as negative which also acceptable but
it is also taking English as negative which is not acceptable
So I want to know whether there is anyway I can make changes directly in
dictionary vectors.
With Regards
Puneet Arora
Re: Editing Dictionary Vector Generated
Posted by Ted Dunning <te...@gmail.com>.
On Fri, Oct 4, 2013 at 6:13 AM, Puneet Arora <ar...@gmail.com>wrote:
> yes you guessed correct that I am using naive bayes, but how can I handle
> this type of problem.
>
I didn't hear about a problem.
You said you didn't like weights on words like English to reflect the fact
that they are used in certain contexts.
I said that this is the way it should work.
Unless you demonstrate that you increase accuracy by changing the weights,
I don't know how to go further. Other algorithms are specifically designed
so that if the weights on English are redundant, then they will be set to
near zero. Naive bayes purposely ignores such redundancy in order to be
simpler.
Re: Editing Dictionary Vector Generated
Posted by Puneet Arora <ar...@gmail.com>.
Thank you Sir for your reply.
yes you guessed correct that I am using naive bayes, but how can I handle
this type of problem.
Rather then switching to any other algorithm
With Regards
On Fri, Oct 4, 2013 at 4:21 PM, Ted Dunning <te...@gmail.com> wrote:
> Why do you say that this is unacceptable?
>
> If the phrase is the most common way that the word English is used, this
> isn't such a bad thing.
>
> In general, with machine learning, the idea is to let the data speak. If
> the data say something you don't like, you have to be careful about
> contradicting it.
>
> That said, you might be happier with something other than naive bayes
> classifieds (which I am guessing you are using). For instance, with
> regularized logistic regression, if the bigram is sufficiently predictive
> then the model will prefer to put zero weight on the constituent unigrams.
>
> Sent from my iPhone
>
> On Oct 4, 2013, at 9:50, Puneet Arora <ar...@gmail.com> wrote:
>
> > anti is marked as negative which also acceptable but
> > it is also taking English as negative which is not acceptable
>
Re: Editing Dictionary Vector Generated
Posted by Ted Dunning <te...@gmail.com>.
Why do you say that this is unacceptable?
If the phrase is the most common way that the word English is used, this isn't such a bad thing.
In general, with machine learning, the idea is to let the data speak. If the data say something you don't like, you have to be careful about contradicting it.
That said, you might be happier with something other than naive bayes classifieds (which I am guessing you are using). For instance, with regularized logistic regression, if the bigram is sufficiently predictive then the model will prefer to put zero weight on the constituent unigrams.
Sent from my iPhone
On Oct 4, 2013, at 9:50, Puneet Arora <ar...@gmail.com> wrote:
> anti is marked as negative which also acceptable but
> it is also taking English as negative which is not acceptable