How to use the scitime.estimate.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 / testing / test_estimator.py View on Github external
def setUp(self):
        self.estimator_metarf = Estimator(meta_algo='RF', verbose=0)
        self.estimator_metann = Estimator(meta_algo='NN', verbose=0)
github nathan-toubiana / scitime / testing / test_estimator.py View on Github external
def setUp(self):
        self.estimator_metarf = Estimator(meta_algo='RF', verbose=0)
        self.estimator_metann = Estimator(meta_algo='NN', verbose=0)
github nathan-toubiana / scitime / scitime / _model.py View on Github external
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")

from scitime.estimate import Estimator
from scitime._utils import get_path, config
from scitime._log import LogMixin, timeit


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
        if self.verbose >= 2:
            self.logger.info(f'Model object created with verbose={self.verbose}, algo={self.algo}, meta_algo={self.meta_algo} and drop_rate={self.drop_rate}')

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