The issue at hand is I need a mathematical method to model the sign of an set of x,y values. Specifically, I know there are methods to use polynomial regression, however, if I only care about the sign of the values (+/-), is there a simpler way? My current method of doing so:
import numpy
numpy.polyfit(x_bytearray,y_bytearray)
however, I only care whether or not the result gives me a positive value where the y_bytearray value was positive, and negative if the y_bytearray value was negative. Is there anyway to fiddle with the polyfit code to use a different weighting method other than least-squares?
Edit
The sign of x is sign(x)= x/abs(x) (-1 or 1) and the fitted polynomial or other expression must only satisfy the requirement that sign(y_bytearray[i]) == sign(computed_y[i]).
Least Squares is popular because it’s simple and easy to calculate. There are lots of other possible methods but they are less likely to be implemented in libraries, so you’ll have to do them yourself.
Another thing to look into is binary classification. There are tons of classification methods, but one of the best is Random Forest.