iskandr/fancyimpute

CPU utilization with IterativeImputer

MarKo9 opened this issue · 1 comments

Hi,

Thanks for your work on this package.
One clarification.
I am using the IterativeImputer in an implementation on AWS and although I have tried several instances they all seem to use only 50% of the available cores (50% is the highest utilization i can get).

Any direction on how i could surpass this setting?

code:
n_imputations = 2
XY_completed = []
for i in range(n_imputations):
imputer = IterativeImputer(initial_strategy='median', n_iter=5,
sample_posterior=True, random_state=i,n_nearest_features=35,
verbose=2)
print("round:",i)
XY_completed.append(imputer.fit_transform(data_0))

Hmm, I think unfortunately you can't make it use more of your CPU. It's sequential by nature, and the underlying model being fit is sklearn's RidgeCV http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.RidgeCV.html, which has no parallel mode =(

Sorry!