Skip to content

Clarification for ML data preprocessing #860

Description

@raivo-otus

This issue is forwarded from an outside source

Original issue description;

The function call preprocess_data() introduced in OMA in 21.3.1 Preprocess for classification task behaves a bit weirdly.
I have four tse-objects that are subsets from the same container. With identical code, in three out of four preprocess_data() outputs “prep_classification” to altExp of the tse. In one of the four it outputs “prep_classification” to an assay directly to tse used, not to altExp.
I rerun the code from scratch and without changing anything, 2/4 behaved the same way inputting the preprocessing only to assay.
This seems to happen randomly in other datasets too, aka running the same script produces different behavior with the same tse objects.

I can do run_ml() on both occasions by setting the altExp to null if the preprocessed data is not in altExp.
I’m having a consistent trouble with run_ml() with tse objects, and while the problem persist on either case, the error is only displayed when I use the preprocessed data from altExp, but not from the assay.

I am currently trying to coordinate and get the original code and data from the anonymous source to replicate the behavior.

This is a function from the mikropml package, and the behavior is intended. The function removes features with zero/low variance, and in the case features don't match after removal the preprocessed data is placed in the altExp -slot of the tse.

Actionable steps

We could make an upstream issue, as in discussion, it would be more clear to have all preprocessed data put into an altExp -slot regardless of feature removal causing mismatch.

In the meantime adding clarification to mikropml::preprocess_data() functions use into the relevant OMA chapter would help clear confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions