The weights will sum to 1.  You can get the missing one by subtracting all
the rest from that (I think)

On Fri, Mar 8, 2013 at 9:04 AM, Zheyi RONG <[email protected]> wrote:

> Dear all,
>
> I would like to ask how I can retrieve the category 0 on which a feature
> has a most impact?
>
> Specifically, now I am doing classification on several categories (labels),
> say, Positive and Negative using AdaptiveLogisticRegression.
>
> When dissecting this model, to get the category on which a feature has a
> most impact,
> I followed the codes from org.apache.mahout.classifier.sgd.SGDHelper, Line
> 74 (mahout-examples 0.7):
>     ngNames.get(w.getMaxImpact() + 1).
> where ngNames is the label list (i.e. ["Positive", "Negative"]), and w is
> the Weight instance of a feature.
>
> However, the Weight class internally represents n labels using a vector
> with n-1 positions ( am I correct?) ,
> so it seems impossible to retrieve category 0, if a feature has a most
> impact on it.
>
> Could anyone tell me how to correctly retrieve category 0, if a feature has
> a most impact on it?
>
> Thanks in advance.
>
> Regards,
> Zheyi.
>

Reply via email to