'max_depth': 5, 'eta': 0.5, 'gamma': 0.1, 'subsample': 1, 'lambda': 1, 'alpha': 0.35, 'objective': 'reg:squarederror', 'eval_metric': ['mae', 'rmse'] } watchlist = [(dtest, 'eval'), (dtrain, 'train')] num_round = 20 # Train model using `xgb.train()` neptune.create_experiment(name='xgb', tags=['train'], params=params) xgb.train(params, dtrain, num_round, watchlist, callbacks=[neptune_callback()]) neptune.stop() # Train model using `xgb.cv()` neptune.create_experiment(name='xgb', tags=['cv'], params=params) xgb.cv(params, dtrain, num_boost_round=num_round, nfold=7, callbacks=[neptune_callback()]) neptune.stop() # Train model using `sklearn` API
params = {'max_depth': 5, 'eta': 0.5, 'gamma': 0.1, 'subsample': 1, 'lambda': 1, 'alpha': 0.35, 'objective': 'reg:squarederror', 'eval_metric': ['mae', 'rmse']} watchlist = [(dtest, 'eval'), (dtrain, 'train')] num_round = 20 # Train model using `xgb.train()` neptune.create_experiment(name='xgb', tags=['train'], params=params) xgb.train(params, dtrain, num_round, watchlist, callbacks=[neptune_callback()]) neptune.stop() # Train model using `xgb.cv()` neptune.create_experiment(name='xgb', tags=['cv'], params=params) xgb.cv(params, dtrain, num_boost_round=num_round, nfold=7, callbacks=[neptune_callback()]) neptune.stop() # Train model using `sklearn` API neptune.create_experiment(name='xgb', tags=['sklearn'], params=params) reg = xgb.XGBRegressor(**params)