Hello,

I have looked at the donut-example for Logistic Regression and have noticed, that a CSV file is used for the training and the test examples. My problem is, that my test examples are usually POJOs ( Plain Old Java Objects, which have usually nothing to do with the CSV format). In other words, I need to simulate this code for probability calculation without using CSV:

/LogisticModelParameters lmp = LogisticModelParameters.loadFrom(new File(LOGISTIC_MODEL_PATH));
CsvRecordFactory csv = lmp.getCsvRecordFactory();
OnlineLogisticRegression lr = lmp.createRegression();
...
Vector v = new SequentialAccessSparseVector(lmp.getNumFeatures());
int target = csv.processLine(line, v); //here 'line is the entry from the CSV file'
double score = lr.classifyScalar(v);
/

Is there a way to do this? Can you please provide some sample code?

Thanks a lot and best regards.

Svetlomir.









Reply via email to