Skip to content

Error: missing the following mandatory columns: ..stratum_wt #847

Open
@invain1218

Description

I am currently using the "smote" pipeline in my project to balance my dataset, which includes a strata variable. The tsk$strata is set to use the feature "wt" for stratification, and the target variable is vs (binary: 0-1).

Here's the code snippet I am using:

pob = po("encode") %>>% po("smote")
pro_tsk = pob$train(train_tsk)[[1]]

However, I encountered the following error:

Cannot rbind data to task 'classification', missing the following mandatory columns: ..stratum_wt
This happened in PipeOp traindata's $train()

It seems the issue is related to the missing strata variable during the pipeline execution. But I can't fix it.
Thank you in advance for your help! 😊

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions