0

I'm trying to use graphlab.linear_regression.create and I get an error that I have missing data in the column I am using to predict my model and it says to use dropna to fix the problem. I use dropna but it doesn't get rid of any of the rows missing values. I am typing ti_train.dropna() to try and drop the missing data and age_model = graphlab.linear_regression.create(ti_train, target='Survived', features=['Age'],validation_set=None) for my linear regression. I've also tried fillna with ti_train.fillna('Age', np.median(ti_train['Age'])). I got my data by reading a csv file into an SFrame. Thank you

  • What language is this? Python? If you add the language tag the question will get more attention from people who know how to help. – bright-star Feb 26 '17 at 01:08

1 Answers1

0

just executing this code won't modify your sframe (assuming you are running ipython notebook with sframe)

ti_train.fillna('Age', np.median(ti_train['Age']))

Have you tried this (LHS for modifying the sframe) and then try running regression

ti_train = ti_train.fillna('Age', np.median(ti_train['Age']))
mojo1643
  • 65
  • 7