jarvis.ai.pkgs.lgbm.regression

Modules for LightGBM regression.

Module Contents

Functions

regression(X=[], Y=[], jid=[], test_size=0.1, plot=False, preprocess=True, feature_importance=True, save_model=False, feat_names=[], model_name='my_model', config={})

Get generic regression model.

get_lgbm(train_x, val_x, train_y, val_y, cv, n_jobs, scoring, n_iter, objective, alpha, random_state, param_dist=default_param_dist)

Train a lightgbm model.

parameters_dict()

Give example optimized parameters.

Attributes

default_param_dist

jarvis.ai.pkgs.lgbm.regression.regression(X=[], Y=[], jid=[], test_size=0.1, plot=False, preprocess=True, feature_importance=True, save_model=False, feat_names=[], model_name='my_model', config={})[source]

Get generic regression model.

jarvis.ai.pkgs.lgbm.regression.default_param_dist
jarvis.ai.pkgs.lgbm.regression.get_lgbm(train_x, val_x, train_y, val_y, cv, n_jobs, scoring, n_iter, objective, alpha, random_state, param_dist=default_param_dist)[source]

Train a lightgbm model.

Args:

train_x: samples used for trainiing

val_x: validation set

train_y: train targets

val_y: validation targets

cv: # of cross-validations

n_jobs: for making the job parallel

scoring: scoring function to use such as MAE

Returns:

Best estimator.

jarvis.ai.pkgs.lgbm.regression.parameters_dict()[source]

Give example optimized parameters.