0

I am currently facing a problem using earth implementation of MARS in python. When I fit my data like this :

model=Earth()
model.fit(data1,data2)
print model.summary()

It gives me this :

Basis Function  Pruned  Coefficient  

(Intercept)     No      1.00313      
x1              Yes     None         
x3              Yes     None         
x4              Yes     None         
x2              Yes     None         
x0              Yes     None         

MSE: 0.0745, GCV: 0.0783, RSQ: 0.0000, GRSQ: 0.0000

But the fitting doesn't please with it and it seems that it only uses linear basis function. I would like to force it using another basis function. How can I do that ?

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847

1 Answers1

1

In your example, MARS has built an intercept-only model. (Your comment that the fit uses linear basis functions is incorrect. Note that the Coefficient value for all variables is "None".)

The MARS algorithm has determined (using the GCV) that there is not enough information in your data to reliably express the response as a function of any of the variables, probably because the amount of noise in the predictor values is too big relative to your sample size. So it decided that for your data, the best prediction value for a new data is simply the average training response value (regardless of the values of the predictors used when making the new prediction).

Stephen Milborrow
  • 976
  • 10
  • 14