How to use the scitime.Estimator function in scitime

To help you get started, we’ve selected a few scitime examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nathan-toubiana / scitime / scitime / _model.py View on Github external
import itertools
import importlib
import json

from sklearn.ensemble import RandomForestRegressor
from sklearn.neural_network import MLPRegressor
from sklearn.metrics import r2_score, mean_squared_error
from sklearn.model_selection import train_test_split, RandomizedSearchCV
from sklearn.preprocessing import StandardScaler

import warnings

warnings.simplefilter("ignore")


class Model(Estimator, LogMixin):
    # default meta-algorithm
    META_ALGO = 'RF'
    # the drop rate is used to fit the meta-algo on random parameters
    DROP_RATE = 0.9
    # the default estimated algorithm is a Random Forest from sklearn
    ALGO = 'RandomForestRegressor'

    def __init__(self, drop_rate=DROP_RATE,
                 meta_algo=META_ALGO, algo=ALGO, verbose=0, bins=None):
        # the end user will estimate the fitting time
        # of self.algo using the package
        super().__init__(bins)
        self.algo = algo
        self.drop_rate = drop_rate
        self.meta_algo = meta_algo
        self.verbose = verbose

scitime

Training time estimator for scikit-learn algorithms

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis