Replacing zero values in diabetes challenge

sir i am converting all columns 0 values to nan values except pragnancies bcz. it can be 0 , and then i am converting them to their respected mean value and i am getting 66% accuracy , what are the changes should i do

hey @atulyaatul1999 ,
before directly converting 0 values to NaN values , you should always first understand that column.
for example , SkinThickness , just think logically can it be 0 ?

So in such what we do is , we just drop that record.
And,
Always imputing values is not the answer , sometimes you also need to delete some records to make your model work better , if you think imputing can useful then look for other methods like , KNNImputer , imputing mode values for categorical columns , mean values for continuous features, etc.

Depending on how you preprocess your data , you can try different models.
Generally , boosting techniques works really good in such cases.
So just have an understanding about first , and work accordingly , Your accuracy will surely improve.

I hope this would have helped you.
Thank You and Happy Learning :slightly_smiling_face:.

but sir my accuracy decreases to 65 from 67 % after deleting the Thickness with value 0

hey @atulyaatul1999 ,
Just dropping that column is not a correct way to improve a model , it sometimes work and sometimes it doesn’t.
Before dropping that column, might that column be correlated to your target value and hence when you deleted it , it effected your results.

For better performance , we drop those features which are :
either highly correlated to another independent feature or very less correlated to target feature.

so , just check correlation values between your dataset features first and examine which is useful and which isn’t .
and as stated in my last reply too ,
Try some feature engineering techniques like scaling data , feature selection with correlation , feature extraction if possible , trying different models ,etc. Using them you can improve your model.