I want to perform Linear Regression on a collection of data using Java. I have couple of questions..
what data types does linear regression method accept? Because, I have tried to load the data in pure nominal format as well as numeric, but then when i'm trying to pass that 'data' (an Instance Variable created in program) to Linear Regression it gives me this exception. Cannot handle Multi-Valued nominal class
How to be able to print the Linear Regression output to console in java. I'm unable to produce the code to do so, after going through the predefined LinearRegression.java class, i got to know that buildClassifier() is the method that takes 'data' as input file. But then i'm unable to move forward. Can anyone help me understand the sequence of steps to follow to be able to get output to console.
protected static void useLinearRegression(Instances data) throws Exception{ BufferedReader reader = new BufferedReader(new FileReader("c:\somePath\healthCare.arff")); Instances data = new Instances(reader); data1.setClassIndex(data1.numAttributes() - 1); LinearRegression2 rl=new LinearRegression2(); rl.buildClassifier(data); //What after this? or before