sassoftware / sassoftware/python-sasctl

Guessing correctly the EM_EVENTPROBABILITY in scoring code

Open
#172 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.