Hi,
I am running Mahout SGD. I read News group sample code and I have created my
own code as my requirements are slightly different.
I am getting ArrayIndexOutOfBound Exception while running
AdaptiveLogisticRegression.train(actual,vector) function. I looked into the
stack trace and found the exact place where I am getting the exception. There
is a class called "DefaultGradient" in "org.apache.mahout.classifier.sgd"
package and exception occurs inside apply function,
This is the code for apply function.
Vector v = classifier.classify(instance);
Vector r = v.like();
if (actual != 0) {
r.setQuick(actual - 1, 1);
}
r.assign(v, Functions.MINUS);
return r;
I am getting the exception in r.setQuick(actual - 1, 1). Can someone help me in
resolving this exception? Thanks in advance.
Regards,
Anand.C