qlib icon indicating copy to clipboard operation
qlib copied to clipboard

How to adapt LSTM to DDG-DA

Open Xxiaoting opened this issue 2 years ago • 1 comments

I want to adapt LSTM to DDG-DA, how can I do that?

What I have tried:

  1. modify rolling_benchmark.py to fit with LSTM parameters
  2. modify the bug caused by changing the dataset object to TSDatasetH. change the file in qlib > contrib > meta > data_selection > model.py:
    def reweight(self, data: Union[pd.DataFrame, pd.Series]):
        # TODO: handling TSDataSampler
        if isinstance(data, pd.DataFrame):
            idx = data.index
        else:
            idx = data.get_index()

        w_s = pd.Series(1.0, index=idx)
        for k, w in self.time_weight.items():
            w_s.loc[slice(*k)] = w
        logger.info(f"Reweighting result: {w_s}")
        return w_s

However, the valid loss remains the same in different epoch and I don't know why.

Xxiaoting avatar Jul 12 '22 11:07 Xxiaoting

@Xxiaoting Do the data weights change here?
You can set a breakpoint here to debug.

you-n-g avatar Jul 18 '22 13:07 you-n-g

This issue is stale because it has been open for three months with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

github-actions[bot] avatar Oct 16 '22 15:10 github-actions[bot]