Jacob-Stevens-Haas / gen-experiments

Pysindy experiments. Composable and extensible
MIT License
1 stars 2 forks source link

Smoothed Finite Difference instead of Savitzky Golay in config #28

Closed yb6599 closed 3 months ago

yb6599 commented 3 months ago

Hey @Jacob-Stevens-Haas, I came across this in config.py:

    "sg1": SeriesDef(
        "Savitsky-Golay",
        diff_params["sfd-ps"],
        ["diff_params.smoother_kws.window_length"],
        [[5, 7, 15]],
    ),
    "sg2": SeriesDef(
        "Savitsky-Golay",
        diff_params["sfd-ps"],
        ["diff_params.smoother_kws.window_length"],
        [[5, 8, 12, 15]],
    ),

This is supposed to be Savitzky Golay Smoothing, so should it not be diff_params["savgol"] instead of diff_params["sfd-ps"]. What should I use during the pde experiments?

Jacob-Stevens-Haas commented 3 months ago

I believe that we're using the pysindy implementation of Savitzky-Golay, rather than the derivative one. What are the values of diff_params["sfd-ps"] and diff_params["savgol"]?

yb6599 commented 3 months ago

The values are:

"sfd-ps": ND({"diffcls": "SmoothedFiniteDifference", "axis":-2}),
"savgol": ND({"diffcls": "sindy", "kind": "savitzky_golay", "axis": -2, "left":0.1, "right":0.1, "order":3}),
Jacob-Stevens-Haas commented 3 months ago

I would use diff_params["sfd-ps"]. ps.SmoothedFiniteDifference also uses a Savitzky-Golay smoother.

yb6599 commented 3 months ago

Got it