In gbdt_model_text.cpp GBDT::LoadModelFromString we can see how a model string should look like in LGBM.
When looking into tree.cpp Tree::Tree, we can see that there are linear trees as well as trees with num_cat > 0.
The current implementation doesn't support these options yet.
For testing purposes, we can generate linear trees using
regressor = lgb.LGBMRegressor(n_estimators=100, random_state=42, linear_trees=True)
regressor.fit(*generate_dataset(n_samples=10000))
In
gbdt_model_text.cppGBDT::LoadModelFromStringwe can see how a model string should look like in LGBM.When looking into
tree.cppTree::Tree, we can see that there are linear trees as well as trees withnum_cat > 0.The current implementation doesn't support these options yet.
For testing purposes, we can generate linear trees using