Okay. So to use these are created linear regression in these are ricotta cross are these are Java project we can do something like this. So, I will do something like fabri static for Main Street arguments okay and I will go and create a new function. So for this new function call your classification podrick study for classification train, train set, stream test set three algorithm in page three index integer test index contains extreme test string algorithm integer tree index in the test index. So I create a new function or method here so I create something that is data sauce sauce equal new data sauce train sec case. So I again do some some QA here I can gather data source here.
I bought this library here okay saw Get Data Set okay instance train equal okay. Still some error data instances instances are created clause okay so I need to handle an exception. So I will do something like this try catch exception Okay then now your brain or your printer I have a message here so yeah message. Okay, so now I don't know anything yeah. Okay. So this is the train set here.
Then train dot set in dot set, set crossing guys to train index Okay, so a train doc cross index equal equal minus one then we said a trained up cross As to train the number of attributes minus one. Okay. Then we do sauce equal new data set, so we'll do something IDs okay. So as you acquire new data so now we gather test asset instances string we change to test. So cross index equal test index. So class index as though Okay, so here is our test on number of IP bills minus one Okay, so I go write something like this.
So he Algol read equate equal to s and in here I suggest not to use equal equal user dot equals linear. We do something like this. Okay should be linear regressions linear regressions so the near New linear regressions okay classifier Capita by CLS equal I mean yeah. Okay. If I want to cross sci fi, then I will do something like deal classifier. So, CK I will have to import maga library first classifier classifiers So, to create a linear regression, I will have to do something like this build classifier, then a training set and for integer i equals zero i less than test set so, number of instances should be high prosperous okay.
And CLS labor equal linea classify instance to be test stock in Stan, hi. Okay. So I can print out a prediction System dot out dot print line. I can print the prediction maybe I print something like this Ah So see the regressions. Here I can do something I see is a request for maybe a prediction. Okay.
So I will rob the linear regression classification here in our regression prediction here