deeptables.utils package

Submodules

deeptables.utils.batch_trainer module

class deeptables.utils.batch_trainer.BatchTrainer(data_train, target, data_test=None, test_as_eval=False, eval_size=0.2, validation_size=0.2, eval_metrics=[], dt_config=None, dt_nets=[['dnn_nets']], dt_epochs=5, dt_batch_size=128, seed=9527, pos_label=None, verbose=1, cross_validation=False, retain_single_model=False, num_folds=5, stratified=True, n_jobs=1, lightgbm_params={}, catboost_params={})[source]

Bases: object

ensemble_predict_proba(models, X=None, y=None, submission=None, submission_target='target')[source]
first_metric_name
static fit_cross_validation(estimator_type, fit_fn, X, y, X_test=None, score_fn=<function roc_auc_score>, estimator_params={}, categorical_feature=None, task_type='binary', num_folds=5, stratified=True, iterators=None, batch_size=None, preds_filepath=None)[source]
gbm_model_predict_proba(dt, model, X)[source]
get_models(models)[source]
probe_evaluate(models, layers, score_fn={})[source]
start(models=['dt'])[source]
train_catboost(config)[source]
train_dt(model_set, config, nets=['dnn_nets'])[source]
train_lgbm(config)[source]
train_model(model_set, config, fit_fn, model_name, **params)[source]
deeptables.utils.batch_trainer.catboost_fit(X, y, X_val, y_val, cat_vars, task, estimator_params)[source]
deeptables.utils.batch_trainer.lgbm_fit(X, y, X_val, y_val, cat_vars, task, estimator_params)[source]
deeptables.utils.batch_trainer.timer(title)[source]

deeptables.utils.consts module

DeepTables constants module.

deeptables.utils.dart_early_stopping module

deeptables.utils.dart_early_stopping.dart_early_stopping(stopping_rounds, first_metric_only=False, verbose=True)[source]

Create a callback that activates early stopping.

Activates early stopping. The model will train until the validation score stops improving. Validation score needs to improve at least every early_stopping_rounds round(s) to continue training. Requires at least one validation datasets and one metric. If there’s more than one, will check all of them. But the training datasets is ignored anyway. To check only the first metric set first_metric_only to True.

Parameters:
  • stopping_rounds (int) – The possible number of rounds without the trend occurrence.
  • first_metric_only (bool, optional (default=False)) – Whether to use only the first metric for early stopping.
  • verbose (bool, optional (default=True)) – Whether to print message with early stopping information.
Returns:

callback – The callback that activates early stopping.

Return type:

function

deeptables.utils.dt_logging module

DeepTables logging module.

deeptables.utils.dt_logging.get_logger(logger_name=None)[source]

deeptables.utils.gpu module

deeptables.utils.gpu.set_memory_growth()[source]
deeptables.utils.gpu.set_memory_limit(limit)[source]

deeptables.utils.quicktest module

deeptables.utils.quicktest.test()[source]

Module contents