Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 28, 2024
1 parent 163128e commit 9299df4
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions example_sequence.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import numpy as np

X = [
[1, 2],
[3, 4]
]
X = [[1, 2], [3, 4]]
for i in range(100):
X.append([
X[-1][0] + X[-2][0],
X[-1][1] / X[-2][1]
])
X.append([X[-1][0] + X[-2][0], X[-1][1] / X[-2][1]])
X = np.array(X)

from pysr import PySRSequenceRegressor

model = PySRSequenceRegressor(
recursive_history_length=2, # How many previous values to use

recursive_history_length=2, # How many previous values to use
# All other parameters are the same as PySRRegressor
model_selection="best", # Result is mix of simplicity+accuracy
niterations=40,
Expand All @@ -33,6 +26,6 @@
# ^ Custom loss function (julia syntax)
)

model.fit(X) # no y needed
model.fit(X) # no y needed

print(model)
print(model)

0 comments on commit 9299df4

Please sign in to comment.