Previous question · 93
Gradient Boosting Classifier
hardML Coding
Next question · 95
Solve a Linear System
mediumML Coding
Random coding question

94. Lag features

easy
GeneralGeneral
senior
Function contract
Inputs
lags
list
series
np.ndarray
Returns
value
tuple

Examples

Input
{
  "lags": [
    1,
    3
  ],
  "series": [
    10,
    11,
    13,
    12,
    15
  ]
}
Output
[
  [
    [
      13,
      10
    ],
    [
      12,
      11
    ]
  ],
  [
    12,
    15
  ]
]

Constraints

Hint 1
Hint 2
Hint 3
Roles
ML Engineer
AI Engineer
Data Scientist
Research Scientist
Analytics Engineer
Companies
GeneralGeneral
Levels
senior
entry
Tags
time-series
feature-engineering
lagged-features
numpy-slicing

Similar Questions

Linear Regressionmedium
ML Coding
Activation function relueasy
ML Coding
Text normalizationmedium
ML Coding
28 people are solving this problem
Loading editor for the selected language
Ln 1, Col 1
Program Output
DATAINTERVIEW
Interactive coding terminal
Python / NumPy environment ready.
Type a command below or run code from the editor.
run scriptExecute the current editor contents
submitGrade the current editor contents against all solution test cases
python ("print hello world")Run an isolated Python command
helpShow all available commands