Explore Courses Blog Tutorials Interview Questions
+2 votes
in Machine Learning by (4.2k points)
edited by

Is there a way to predict how long it will take to run a classifier from sci-kit learn based on the parameters and dataset? I know, pretty meta, right?

Some classifiers/parameter combinations are quite fast, and some take so long that I eventually just kill the process. I'd like a way to estimate in advance how long it will take.

Alternatively, I'd accept some pointers on how to set common parameters to reduce the run time.

1 Answer

+2 votes
by (6.8k points)

We're really functioning on a package that provides runtime estimates of scikit-learn fits.

You would primarily run it right before running the, y) to induce the runtime estimation.

Here's a simple use case:

from scitime import Estimator 

estimator = Estimator() 

rf = RandomForestRegressor() 

X,y = np.random.rand(100000,10),   np.random.rand(100000,1) 

# Run the estimation 

estimation, lower_bound, upper_bound = estimator.time(rf, X, y)

For more insights on this, study the Scikit-Learn Python Cheat Sheet

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.6k answers


108k users

Browse Categories