sassoftware / sassoftware/python-sasctl
Guessing correctly the EM_EVENTPROBABILITY in scoring code
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 52
- Forks
- 45
- Avg merge
- 23h 38m
- Merged PRs (30d)
- 2
Description
When using pzmm.ImportModel.import_model for wirting scoring code for binary/multinomial classification it assumes from result = SKmodel.predict_proba(...) that the result[0] is the target variable probability and assigns it to EM_EVENTPROBABILITY, which may be incorrect, the levels probability may be in a distinct column.
At least for classification models, you can get the probability class labels and orders from SKmodel.classes_. If the user adds something like targetevent = "label", we could use it to assign the correct column of probability to EM_EVENTPROBABILITY.
It is likely that this only works for classification, and should not be confused when the model is a regression.
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
Start at pzmm.ImportModel.import_model and inspect how SKmodel.predict_proba(...) is mapped to EM_EVENTPROBABILITY. Compare the probability columns with SKmodel.classes_, then determine how a targetevent value could select the correct class for binary and multinomial classification without affecting regression behavior. Verify the resulting behavior with the relevant project tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100