Ok, I can also add one more line here I can do something like this System dot out dot println lie then I can print the instance so test dot instance I say two I am prediction is a classification table here okay. So, after I create these are linear regression model here. So, I will explain about what all this means. So, let's say this is the classification method. So, we have this our training set and then the test set algorithm training dice and the testing test. So, they are data sauce sauce equal new data salsa train set.
So, in the string sorry are put into our location or the training Data okay instances equal train instances train because sauce gather data set from these are data ah training data location then train dot cyclocross index to be a trading desk. So for crossing that what are these cohere mean is that for let's say, data here. So let's say I have Iris data. Okay, let's say I have Iris data here. So I want to set our variable to be less cost variables. So let's say I want to say these are variable here to the class variable.
So I will set the variable using the index, so the index will be 0123 and four. So the fourth index will be our variable class here. So let's see, I want to set this variable to be a class variable, I will set index to be 401234. So let's see, class indices not found not set. I will set a class in class using the number of variables on number of attributes minus one. So let's say I have all the variables here, so 123455 variables, so five minus one will be four.
So one, two Three four. So, if I say the class index is not being set, there we take the last variable last column as a class variable. So now we look into Java code here. So for training data, we set a class index. Then for testing data, we also do the same thing. So we import the testing data and then we set our class index.
Then eat algorithm is equal to linear linear regression linear equal new linear regression. classifier c is equal new linear classifier, we build a classifier using our training set. So for integer i equals zero, i less than the number of instances observation of roles in this testing testing set I pass brass. So dhaba classification label equal linear classifier observation or the role and then I print out Ah install the role roll and then I print out a prediction issue is cross label here. So, this is what a cause mean. So, a in these are linear regression