0

I have been trying to fit my data to a custom equation.which is the following y=(a1/x)+a2*x2+b with curve fit i used curve fit with 1 independant variable it works perfectly but i cannot figure out how to use it with 2

def func (x1,x2,a1,a2,b):
    y=(a1/x)+a2*x2+b
    return y

x=df[["feature1","feature2"]].values
y=df["target"].values
x_train,x_test,y_train,y_test=train_test_split(x,y, test_size=0.30, random_state=42)
Mohamed Amine
  • 340
  • 1
  • 4
  • 16

0 Answers0