pymc-devs / pymc-devs/pytensor
Rewrite `argmax(f(x)` -> argmax(x)` for monotonic f
Open
Nobody has claimed this yet.
graph rewriting
- Dominant language
- Python
- Stars
- 644
- Forks
- 208
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 16
Description
Description
Similarly max(f(x)) -> f(max(x))
We can also convert (arg)max to (arg)min for monotonic decreasing functions
Contributor guide
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
The issue does not name an implementation file, test, or entry point. Start by locating PyTensor's graph-rewrite handling for argmax, max, and monotonic functions, then determine the supported transformation rules and add coverage showing the rewrites for increasing and decreasing functions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100