Random Forest for regression in LightGBM?
Hi, I've been trying to use RF with regression objective in LightGBM for python, but the loss value never decreases. Even if I tune the parameters it never decreases. Is Random Forest implemented for regression in LightGBM for python?
Are you using subsampling and column sampling? If you use Random Forest without sampling, it will learn from a single tree only as all trees would become identical to the first one.
@Laurae2 Sure, with a value of 0.8...
Can you provide a reproducible script?
@Laurae2 I've used this parameters... param = {'num_leaves':300, 'objective':'regression', 'max_depth':-1, 'learning_rate':0.01, "min_child_samples":20, "boosting":"rf", "feature_fraction":0.4, "bagging_freq":10, "bagging_fraction":0.4 , "bin_construct_sample_cnt":200000, "bagging_seed": 11} param['metric'] = ['mae']
@Laurae2 This is the relevant part of my script: train_data=lgb.Dataset(X_new_train,label=y_new_train) validation_data = lgb.Dataset(X_val,label=y_val) num_round = 100 clf2=lgb.train(param,train_data,num_round,valid_sets = [validation_data],early_stopping_rounds = 100,categorical_feature = [59] ) predictions=clf2.predict(X_test)
@yoshimoncho it is better to use bagging_freq=1 for RF.
Is it possible to get the value of each estimator in random_forests to generate prediction intervals/uncertainty estimates?