Skip to content
DeepForgeby svx
All problems
EasyML Fundamentalsml-261

Stacking Meta-Features

Problem

Build the meta-feature matrix for stacking by transposing predictions so each sample becomes a row with one column per base model.

Empty input returns [].

Hint

The meta-model learns from out-of-fold base predictions as features.

Test cases

case 1
in: [[[0.1,0.2,0.3],[0.9,0.8,0.7]]]
expected: [[0.1,0.9],[0.2,0.8],[0.3,0.7]]
case 2
in: [[[1,2]]]
expected: [[1],[2]]
case 3
in: [[]]
expected: []
Starter codePython
def stacking_meta_features(predictions):
    # Your code here
    pass

3 test cases · run your code against them in the editor