reset password
Author Message
vsevak
Posts: 18
Posted 13:19 Feb 04, 2016 |

I have doubts for 3rd and 4th points.

for scale featuring i can find like x_scale = X/X.max()

and for mean normalize x_normalize = (X-X.mean()) / X.std().

So my question is we need to find both scale and mean-normalize values and returns [x_scale, x_normalize] vector like this??????

and for 4th point it says replace all values in dataframe with with scaled and mean-normalize values. So how to replace single value with these two values?????

I am stuck at these points. Please clarify.

Thanks

msargent
Posts: 519
Posted 14:00 Feb 04, 2016 |

To replace all the values in a column, consider mapping using the function you created. 

You may also use other ways --- try googling (I'm not going to give this one away).

Last edited by msargent at 14:08 Feb 04, 2016.
vsevak
Posts: 18
Posted 14:05 Feb 04, 2016 |

Thanks for your reply professor but my question is with which value i should replace dataframe values? 

scale values or mean-normalize values??

In description it says replace with both values. I am confuse here.

Thanks

msargent
Posts: 519
Posted 14:09 Feb 04, 2016 |
vsevak wrote:

Thanks for your reply professor but my question is with which value i should replace dataframe values? 

scale values or mean-normalize values??

In description it says replace with both values. I am confuse here.

Thanks

Ng means by feature scaling dividing the number by the max value for that column. Mean-normalization is subtracting the mean from each value before dividing. See the lecture notes for details.