Run linters with the multi output demo. (#8966)
This commit is contained in:
parent
acc110c251
commit
401ce5cf5e
@ -46,7 +46,7 @@ def gen_circle() -> Tuple[np.ndarray, np.ndarray]:
|
||||
return X, y
|
||||
|
||||
|
||||
def rmse_model(plot_result: bool, strategy: str):
|
||||
def rmse_model(plot_result: bool, strategy: str) -> None:
|
||||
"""Draw a circle with 2-dim coordinate as target variables."""
|
||||
X, y = gen_circle()
|
||||
# Train a regressor on it
|
||||
@ -120,10 +120,10 @@ if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--plot", choices=[0, 1], type=int, default=1)
|
||||
args = parser.parse_args()
|
||||
|
||||
# Train with builtin RMSE objective
|
||||
# - One model per output.
|
||||
rmse_model(args.plot == 1, "one_output_per_tree")
|
||||
|
||||
# - One model for all outputs, this is still working in progress, many features are
|
||||
# missing.
|
||||
rmse_model(args.plot == 1, "multi_output_tree")
|
||||
|
||||
@ -161,6 +161,7 @@ def main(args: argparse.Namespace) -> None:
|
||||
"demo/guide-python/spark_estimator_examples.py",
|
||||
"demo/guide-python/individual_trees.py",
|
||||
"demo/guide-python/quantile_regression.py",
|
||||
"demo/guide-python/multioutput_regression.py",
|
||||
# CI
|
||||
"tests/ci_build/lint_python.py",
|
||||
"tests/ci_build/test_r_package.py",
|
||||
@ -204,6 +205,7 @@ def main(args: argparse.Namespace) -> None:
|
||||
"demo/guide-python/feature_weights.py",
|
||||
"demo/guide-python/individual_trees.py",
|
||||
"demo/guide-python/quantile_regression.py",
|
||||
"demo/guide-python/multioutput_regression.py",
|
||||
# tests
|
||||
"tests/python/test_dt.py",
|
||||
"tests/python/test_data_iterator.py",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user