I have one regression model that I did in python with Sklearn, I have trained it and tested prediction. Now I would do predictions from an Android app, so I tested some things like Sklearn-Porter or save in a pkl file but not work. Please help me. How can I do prediction from an android app?
My python code that I would translate:
X = array(listX)
vector = listY
predict=[[99.0, 94.0, 90.0, 83.0, 70.0, 30.0, 50.0, 48.0, 41.0, 52.0, 0, 24.0, 41.0, 44.0, 33.0, 19.0, 0, 17.0, 0, 0, 35.0, 0, 0, 17.0, 0, 0, 0, 0, 17.0, 0, 15.0, 0, 15.0, 0, 15.0, 13.0, 0, 0, 0, 0, 0, 0, 0, 17.0, 0, 0, 15.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61.0]]
poly = PolynomialFeatures(degree=2)
X_ = poly.fit_transform(X)
predict_ = poly.fit_transform(predict)
X_ = np.delete(X_,(1),axis=1) predict_ = np.delete(predict_,(1),axis=1)
clf = LinearRegression()
clf.fit(X_, vector)
print "X=",clf.predict(predict_)[0][0]," Y=",clf.predict(predict_)[0][1]