class TanhProcess(Processor) error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 48.7k
- Forks
- 7.7k
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Bug Description
data.columns.get_level_values(1).str.contains("LABEL") is weird.
data.columns.get_level_values(1) will never contain LABEL, but data.columns.get_level_values(0) will.
if you want filter label, why do not use fields_group params?
class TanhProcess(Processor):
"""Use tanh to process noise data"""
def __call__(self, df):
def tanh_denoise(data):
mask = data.columns.get_level_values(1).str.contains("LABEL")
col = df.columns[~mask]
data[col] = data[col] - 1
data[col] = np.tanh(data[col])
return data
return tanh_denoise(df)
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
Screenshot
Environment
Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.
- Qlib version:
- Python version:
- OS (
Windows,Linux,MacOS): - Commit number (optional, please provide it if you are using the dev version):
Additional Notes
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TanhProcess implementation and inspect how its pandas column levels and fields_group parameters are defined. Reproduce the reported LABEL filtering behavior with the provided class and a representative DataFrame, then confirm the intended label-column selection with a focused test or documented reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100