[SciPy-user] predicting values based on (linear) models

Pierre GM pgmdevlist@gmail....
Thu Jan 15 11:19:16 CST 2009


>
> With 2 and 3 I have little experience
> Missing observations, I usually remove or clean in the initial data
> preparation. mstats provides functions for masked arrays, but stats
> mostly assumes no missing values. What would be the generic treatment
> for missing observations, just dropping all observations that have
> NaNs or converting them to masked arrays and expand the function that
> can handle those?
>

That depends on the situation. For linear fitting, missing values  
could be dropped (using the MaskedArray.compressed method if the data  
is 1D, or by using something like a[~np.isnan(a)]). In other cases,  
the missing values have to be taken into account.




More information about the SciPy-user mailing list