Skip to content

Commit 349733d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent bc62633 commit 349733d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

machine_learning/xgboostregressor.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
from xgboost import XGBRegressor
66

77

8-
def dataset(datatype:dict) -> tuple:
8+
def dataset(datatype: dict) -> tuple:
99
# Split dataset into train and test data
10-
x = (datatype["data"],datatype["target"]) # features
10+
x = (datatype["data"], datatype["target"]) # features
1111
return x
1212

1313

14-
def xgboost(features:list, target:list,test_features:list) -> list:
14+
def xgboost(features: list, target: list, test_features: list) -> list:
1515
xgb = XGBRegressor()
1616
xgb.fit(features, target)
1717
# Predict target for test data
@@ -30,7 +30,7 @@ def main() -> None:
3030
# Load Boston house price dataset
3131
boston = load_boston()
3232
print(boston.keys())
33-
33+
3434
features, target = dataset(boston)
3535
x_train, x_test, y_train, y_test = train_test_split(
3636
features, target, test_size=0.25, random_state=1
@@ -44,6 +44,7 @@ def main() -> None:
4444

4545
if __name__ == "__main__":
4646
import doctest
47+
4748
doctest.testmod(name="main", verbose=True)
4849
doctest.testmod(name="dataset", verbose=True)
4950
doctest.testmod(name="xgboost", verbose=True)

0 commit comments

Comments
 (0)