thank you ,I had found that method
that is the different
on is
return beta.times(instance);
another is
return beta.getRow(0).dot(instance);
thanks very much ,I will recompile TrainLogistic class
At 2011-08-29 00:02:32,"Ted Dunning" <[email protected]> wrote:
>That limit is only for that one classifier call. The idea is that if you
>have two categories then getting just one score eliminates the construction
>of a vector. Use classify() In the general case.
>
>On Sunday, August 28, 2011, myn <[email protected]> wrote:
>> I was read the AbstractOnlineLogisticRegression(SGD) sorce code ,but
>> it limit the number of numCategories to 2,why? why not 3 or more?
>>
>> @Override
>> public double classifyScalar(Vector instance) {
>> Preconditions.checkArgument(numCategories() == 2, "Can only call
>classifyScalar with two categories");
>>
>> // apply pending regularization to whichever coefficients matter
>> regularize(instance);
>>
>> // result is a vector with one element so we can just use dot product
>> return link(classifyScalarNoLink(instance));
>> }
>>