drift_generator
generate_drift(data, drift_values=[1.1, 10.0, 0.1, 1.1])
¶
Generates a drift array based on the number of rows in the input data and the specified drift values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
DataFrame or ndarray
|
The input data. |
required |
drift_values |
list of float
|
The drift values to use. |
[1.1, 10.0, 0.1, 1.1]
|
Returns:
Type | Description |
---|---|
ndarray
|
The generated drift array. |
Examples:
>>> import numpy as np
>>> from spotriver.drift.drift_generator import generate_drift
>>> data = np.array([[1, 2, 3], [4, 5, 6]])
>>> generate_drift(data, drift_values=[1.1, 10.0, 0.1, 1.1])
array([ 1.1, 10. , 0.1, 1.1])
Source code in spotriver/drift/drift_generator.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|