scikit-mice
scikit-mice copied to clipboard
Update code
Hi,
I tried to run your code, but I got plenty of errors. Such as:
- Missing self in signature of fucntion _get_mask
- Missing second parameter on line 30 for function _get_mask
- Error from numpy on line 65 (data type not understood)
- Unknown variable 'predict_indicies' on line 56
These error I fixed but another occurs:
"This module will be removed in 0.20.", DeprecationWarning) Traceback (most recent call last): File "/imputer.py", line 8, in <module> X, specs = imputer.transform(X, LinearRegression, 10) File "/skmice_2.py", line 70, in transform specs[i][c] = self._process(X, c, model_class) File "/skmice_2.py", line 42, in _process X_train, X_test, y_train, y_test = train_test_split(X_data, y_data, test_size=0.33, random_state=42) File "/venv/lib/python2.7/site-packages/sklearn/cross_validation.py", line 2059, in train_test_split arrays = indexable(*arrays) File "/venv/lib/python2.7/site-packages/sklearn/utils/validation.py", line 229, in indexable check_consistent_length(*result) File "/venv/lib/python2.7/site-packages/sklearn/utils/validation.py", line 204, in check_consistent_length " samples: %r" % [int(l) for l in lengths]) ValueError: Found input variables with inconsistent numbers of samples: [2, 3]
Can you please update code to work? Even in python 2.x. Transition to python 3 I can do by myself.