Predicting how long an scikit-learn classification will take to run

后端 未结 3 1428
猫巷女王i
猫巷女王i 2020-12-29 22:46

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 classif

3条回答
  •  情歌与酒
    2020-12-29 22:59

    We're actually working on a package that gives runtime estimates of scikit-learn fits.

    You would basically run it right before running the algo.fit(X, y) to get 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)
    

    Feel free to take a look!

提交回复
热议问题