Skip to content
DeepForgeby svx
All problems
MediumTime Seriests-244

N-BEATS Basis Count

Problem

Count the basis coefficients in an N-BEATS-style model: blocks * terms.

Return the product. Each block expresses its forecast in the same shared basis.

Hint

The count is the total size of the basis mixing layer in the ensemble of blocks.

Test cases

case 1
in: [3,8]
expected: 24
case 2
in: [1,1]
expected: 1
case 3
in: [0,5]
expected: 0
case 4
in: [2,0]
expected: 0
Starter codePython
def nbeats_basis_count(blocks, terms):
    # Your code here
    pass

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