Improve removal of "medium" class.
parent
112d968715
commit
db06584ddd
|
@ -102,8 +102,9 @@ 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:
|
||||
model_input = model_input[model_input["target"] != "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