Improve removal of "medium" class.
parent
112d968715
commit
db06584ddd
|
@ -102,7 +102,8 @@ model_input["target"], edges = pd.cut(
|
|||
) # ['low', 'medium', 'high']
|
||||
print(model_input["target"].value_counts())
|
||||
REMOVE_MEDIUM = True
|
||||
if ("medium" in model_input["target"]) and REMOVE_MEDIUM:
|
||||
if REMOVE_MEDIUM:
|
||||
if "medium" in model_input["target"]:
|
||||
model_input = model_input[model_input["target"] != "medium"]
|
||||
model_input["target"] = (
|
||||
model_input["target"].astype(str).apply(lambda x: 0 if x == "low" else 1)
|
||||
|
|
Loading…
Reference in New Issue