![]() Registered Member ![]()
|
hello,
What would be the best way to do a feature normalize for an input MatrixXd X with Eigen? i.e. subtract the mean and divide by the variance column-wise. The pseudo code would be along the lines of e.g.
TIA, Best regards, Giovanni |
![]() Moderator ![]()
|
For repmat you can use the replicate function, but here it is simpler to use rowwise. For coefficient-wise operations, you can either move to the array world or use the few cwise* functions. For instance:
|
![]() Registered Member ![]()
|
hi ggael,
Thank you for the good and quick answer ![]()
UPDATE: the feature normalization divides by the standard deviation and not by the variance. This has been corrected above. Best regards, Giovanni |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]