Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wenbang24 committed Aug 16, 2024
1 parent 6eb7920 commit 5407157
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 26 deletions.
19 changes: 0 additions & 19 deletions pysr/regressor_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,25 +216,6 @@ def predict(self, X, index=None, num_predictions=1):
)
return pred

""" historical_X = self._sliding_window(X)[:: X.shape[1], :]
pred = self._regressor.predict(X=historical_X, index=index)
if extra_predictions > 0:
output = pred
previous_points = historical_X[-1]
# Without this, the model will re-predict the last data point
pred_once = self._regressor.predict(X=[previous_points], index=index)
previous_points = previous_points[X.shape[1] :]
previous_points = np.append(previous_points, pred_once)
previous_points = previous_points.flatten()
for _ in range(extra_predictions):
pred_once = self._regressor.predict(X=[previous_points], index=index)
previous_points = previous_points[X.shape[1] :]
previous_points = np.append(previous_points, pred_once)
previous_points = previous_points.flatten()
output = np.append(output, pred_once)
return output.reshape(-1, X.shape[1])
return pred """

def _sliding_window(self, X):
return np.lib.stride_tricks.sliding_window_view(
X.flatten(), self.recursive_history_length * np.prod(X.shape[1])
Expand Down
14 changes: 7 additions & 7 deletions pysr/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1575,14 +1575,14 @@ def test_unit_propagation(self):
def runtests(just_tests=False):
"""Run all tests in test.py."""
test_cases = [
# TestPipeline,
TestPipeline,
TestSequenceRegressor,
# TestBest,
# TestFeatureSelection,
# TestMiscellaneous,
# TestHelpMessages,
# TestLaTeXTable,
# TestDimensionalConstraints,
TestBest,
TestFeatureSelection,
TestMiscellaneous,
TestHelpMessages,
TestLaTeXTable,
TestDimensionalConstraints,
]
if just_tests:
return test_cases
Expand Down

0 comments on commit 5407157

Please sign in to comment.