Skip to content

Commit b5da3e1

Browse files
authored
Replace l with length (#686)
Co-authored-by: Nils Braun <[email protected]>
1 parent 8106334 commit b5da3e1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tsfresh/examples/driftbif_simulation.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,9 @@ def sample_tau(n=10, kappa_3=0.3, ratio=0.5, rel_increase=0.15):
132132
return tau.tolist()
133133

134134

135-
def load_driftbif(n, l, m=2, classification=True, kappa_3=0.3, seed=False):
135+
def load_driftbif(n, length, m=2, classification=True, kappa_3=0.3, seed=False):
136136
"""
137-
Simulates n time-series with l time steps each for the m-dimensional velocity of a dissipative soliton
137+
Simulates n time-series with length time steps each for the m-dimensional velocity of a dissipative soliton
138138
139139
classification=True:
140140
target 0 means tau<=1/0.3, Dissipative Soliton with Brownian motion (purely noise driven)
@@ -145,8 +145,8 @@ def load_driftbif(n, l, m=2, classification=True, kappa_3=0.3, seed=False):
145145
146146
:param n: number of samples
147147
:type n: int
148-
:param l: length of the time series
149-
:type l: int
148+
:param length: length of the time series
149+
:type length: int
150150
:param m: number of spatial dimensions (default m=2) the dissipative soliton is propagating in
151151
:type m: int
152152
:param classification: distinguish between classification (default True) and regression target
@@ -166,8 +166,8 @@ def load_driftbif(n, l, m=2, classification=True, kappa_3=0.3, seed=False):
166166
logging.warning("You set the dimension parameter for the dissipative soliton to m={}, however it is only"
167167
"properly defined for m=1 or m=2.".format(m))
168168

169-
id = np.repeat(range(n), l * m)
170-
dimensions = list(np.repeat(range(m), l)) * n
169+
id = np.repeat(range(n), length * m)
170+
dimensions = list(np.repeat(range(m), length)) * n
171171

172172
labels = list()
173173
values = list()
@@ -180,8 +180,8 @@ def load_driftbif(n, l, m=2, classification=True, kappa_3=0.3, seed=False):
180180
labels.append(ds.label)
181181
else:
182182
labels.append(ds.tau)
183-
values.append(ds.simulate(l, v0=np.zeros(m)).transpose().flatten())
184-
time = np.stack([ds.delta_t * np.arange(l)] * n * m).flatten()
183+
values.append(ds.simulate(length, v0=np.zeros(m)).transpose().flatten())
184+
time = np.stack([ds.delta_t * np.arange(length)] * n * m).flatten()
185185

186186
df = pd.DataFrame({'id': id, "time": time, "value": np.stack(values).flatten(), "dimension": dimensions})
187187
y = pd.Series(labels)

0 commit comments

Comments
 (0)