I'm trying to find what is the score function for the LightGBM regressor. In their documentation page I could not find any information regarding the function used to calculate the score attribute...
1 Answer
$\begingroup$
$\endgroup$
1
The score function of the LGBMRegressor
is the R-squared.
from lightgbm import LGBMRegressor
from sklearn.datasets import make_regression
from sklearn.metrics import r2_score
X, y = make_regression(random_state=42)
model = LGBMRegressor()
model.fit(X, y)
y_pred = model.predict(X)
print(model.score(X, y))
# 0.9863556751160256
print(r2_score(y, y_pred))
# 0.9863556751160256
-
1$\begingroup$ Good to see you here as well ;) $\endgroup$ Commented Nov 3, 2021 at 17:15