Guest User

Untitled

a guest
Jul 18th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. from numpy import vstack, array, nan
  2. from sklearn.preprocessing import Imputer
  3. #missing value calculation, return value is the data after calculating the missing value
  4. # The parameter missing_value is a representation of the missing value. The default is NaN.
  5. #Parameters is a missing value filling method, the default is mean (mean)
  6. Imputer().fit_transform(vstack((array([nan, nan, nan, nan]),iris.data)))
Add Comment
Please, Sign In to add comment