Skip to content

Relaxing R's naming conventions in mlr3 #775

@Fred-Wu

Description

@Fred-Wu

I am trying an old project using mlr3 for learning purposes. The data has hundreds of variables directly downloaded from a database, so the names of those variables may not necessarily follow R's naming conventions. It is also inpractical to rename them. With many of those variables with non-R names, here is the error message I got.

Error in .__Task__initialize(self = self, private = private, super = super,  : 
  Assertion on 'feature names' failed: Must have names according to R's variable naming conventions, but element 29 does not comply.

Also this error will definitely occur if I tries to re-encode data with sparse matrix, like

dmy <- caret::dummyVars(" ~ .", data = df)
df <- Matrix(predict(dmy, newdata = df), sparse = T)

This will create more unconventional variable names.

Could mlr3 relax the naming conventions?

Metadata

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