Unverified Commit 18d57934 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[dask] test that Dask automatically treats 'category' columns as categorical features (#3932)

parent 06ed4337
...@@ -210,11 +210,6 @@ def test_classifier(output, centers, client, listen_port): ...@@ -210,11 +210,6 @@ def test_classifier(output, centers, client, listen_port):
"num_leaves": 10 "num_leaves": 10
} }
if output == 'dataframe-with-categorical':
params["categorical_feature"] = [
i for i, col in enumerate(dX.columns) if col.startswith('cat_')
]
dask_classifier = lgb.DaskLGBMClassifier( dask_classifier = lgb.DaskLGBMClassifier(
client=client, client=client,
time_out=5, time_out=5,
...@@ -283,11 +278,6 @@ def test_classifier_pred_contrib(output, centers, client, listen_port): ...@@ -283,11 +278,6 @@ def test_classifier_pred_contrib(output, centers, client, listen_port):
"num_leaves": 10 "num_leaves": 10
} }
if output == 'dataframe-with-categorical':
params["categorical_feature"] = [
i for i, col in enumerate(dX.columns) if col.startswith('cat_')
]
dask_classifier = lgb.DaskLGBMClassifier( dask_classifier = lgb.DaskLGBMClassifier(
client=client, client=client,
time_out=5, time_out=5,
...@@ -379,11 +369,6 @@ def test_regressor(output, client, listen_port): ...@@ -379,11 +369,6 @@ def test_regressor(output, client, listen_port):
"num_leaves": 10 "num_leaves": 10
} }
if output == 'dataframe-with-categorical':
params["categorical_feature"] = [
i for i, col in enumerate(dX.columns) if col.startswith('cat_')
]
dask_regressor = lgb.DaskLGBMRegressor( dask_regressor = lgb.DaskLGBMRegressor(
client=client, client=client,
time_out=5, time_out=5,
...@@ -460,11 +445,6 @@ def test_regressor_pred_contrib(output, client, listen_port): ...@@ -460,11 +445,6 @@ def test_regressor_pred_contrib(output, client, listen_port):
"num_leaves": 10 "num_leaves": 10
} }
if output == 'dataframe-with-categorical':
params["categorical_feature"] = [
i for i, col in enumerate(dX.columns) if col.startswith('cat_')
]
dask_regressor = lgb.DaskLGBMRegressor( dask_regressor = lgb.DaskLGBMRegressor(
client=client, client=client,
time_out=5, time_out=5,
...@@ -519,11 +499,6 @@ def test_regressor_quantile(output, client, listen_port, alpha): ...@@ -519,11 +499,6 @@ def test_regressor_quantile(output, client, listen_port, alpha):
"num_leaves": 10 "num_leaves": 10
} }
if output == 'dataframe-with-categorical':
params["categorical_feature"] = [
i for i, col in enumerate(dX.columns) if col.startswith('cat_')
]
dask_regressor = lgb.DaskLGBMRegressor( dask_regressor = lgb.DaskLGBMRegressor(
client=client, client=client,
local_listen_port=listen_port, local_listen_port=listen_port,
...@@ -593,11 +568,6 @@ def test_ranker(output, client, listen_port, group): ...@@ -593,11 +568,6 @@ def test_ranker(output, client, listen_port, group):
"min_child_samples": 1 "min_child_samples": 1
} }
if output == 'dataframe-with-categorical':
params["categorical_feature"] = [
i for i, col in enumerate(dX.columns) if col.startswith('cat_')
]
dask_ranker = lgb.DaskLGBMRanker( dask_ranker = lgb.DaskLGBMRanker(
client=client, client=client,
time_out=5, time_out=5,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment