Skip to content

Commit a60c001

Browse files
authored
Ruff error fix in catboost_regressor.py
1 parent 8c18770 commit a60c001

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

machine_learning/catboost_regressor.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
CatBoost Regressor Example.
33
44
This script demonstrates the usage of the CatBoost Regressor for a simple regression task.
5-
CatBoost is a powerful gradient boosting library that handles categorical features automatically
6-
and is highly efficient.
5+
CatBoost is a powerful gradient boosting library that handles categorical features
6+
automatically and is highly efficient.
77
88
Make sure to install CatBoost using:
99
pip install catboost
@@ -13,8 +13,8 @@
1313

1414
import numpy as np
1515
from sklearn.datasets import fetch_california_housing
16-
from sklearn.model_selection import train_test_split
1716
from sklearn.metrics import mean_squared_error
17+
from sklearn.model_selection import train_test_split
1818
from catboost import CatBoostRegressor
1919

2020

@@ -59,7 +59,9 @@ def catboost_regressor(features: np.ndarray, target: np.ndarray) -> CatBoostRegr
5959
>>> isinstance(model, CatBoostRegressor)
6060
True
6161
"""
62-
regressor = CatBoostRegressor(iterations=100, learning_rate=0.1, depth=6, verbose=0)
62+
regressor = CatBoostRegressor(
63+
iterations=100, learning_rate=0.1, depth=6, verbose=0
64+
)
6365
regressor.fit(features, target)
6466
return regressor
6567

@@ -97,4 +99,4 @@ def main() -> None:
9799
import doctest
98100

99101
doctest.testmod(verbose=True)
100-
main()
102+
main()

0 commit comments

Comments
 (0)