InseadDataAnalytics / INSEADAnalytics

Other
122 stars 1.31k forks source link

Issue with Logistic model plot - Assignment 2 #126

Open nicknco opened 6 years ago

nicknco commented 6 years ago

Hi All,

I am not sure what is going on with the fitting of the glm model, but get the following errors when I try to plot it:

Warning messages: 1: not plotting observations with leverage one: 6941, 7088, 7277, 16565 2: not plotting observations with leverage one: 6941, 7088, 7277, 16565 3: In sqrt(crit p (1 - hh)/hh) : NaNs produced 4: In sqrt(crit p (1 - hh)/hh) : NaNs produced

I also get the following error when trying to then predict using the model: Error in model.frame.default(Terms, newdata, na.action = na.action, xlev = object$xlevels) : factor PAY_4 has new levels 1

Anyone got any ideas about this?

Thanks!

DivyaDaniel commented 6 years ago

I get the same error messages as above for the glm model. Also is there a way to identify which data set corresponds to the outliers on the plots?

Antoine-Engerand commented 6 years ago

We also get the same, and that seems to come from the glm model which spits this out: "Coefficients: (2 not defined because of singularities)"

Any clue why it does that and how to move forward?

mnpandit commented 6 years ago

We're also getting the same error for the glm model. Would appreciate help on how to proceed.

nicknco commented 6 years ago

Hey guys, we are still working on a proper solution, but in the meantime, if you change the random seed number for the data split, this resolves the issue..not clear why though! If you find a proper solution, please let us know!

thanks