8000 writeModelStats not working · Issue #146 · sassoftware/python-sasctl · GitHub
[go: up one dir, main page]

Skip to content

writeModelStats not working #146

New issue

Have a 8000 question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kangfucius opened this issue Jan 13, 2023 · 2 comments
Closed

writeModelStats not working #146

kangfucius opened this issue Jan 13, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@kangfucius
Copy link
kangfucius commented Jan 13, 2023

After upgrading sasctl to 1.8.0 I tried to run through pzmmModelImportExample.ipynb. it seems pzmm.JSONFiles has changed and breaks the notebook code:

  1. in cell No. 43, the line J.createRequirementsJSON(zipFolder) needed to change to new signature, J.create_requirements_json(zipFolder). This was an easy fix.

  2. this one is trickier, and hence raising the issue: the line in cell No. 45, J.calculateFitStat(trainData=trainData, testData=testData, jPath=zipFolder) doesn't work and throws the below exception


~/anaconda3/lib/python3.9/site-packages/sasctl/pzmm/write_json_files.py in calculateFitStat(cls, validateData, trainData, testData, jPath)
560 fitStats["MCLL"] = MCLL
561
--> 562 KS = max(math.fabs(fpr - tpr))
563 fitStats["KS"] = KS
564

TypeError: only size-1 arrays can be converted to Python scalars

@smlindauer smlindauer self-assigned this Jan 17, 2023
@smlindauer
Copy link
Collaborator

Thanks @kangfucius.

I think this got caught up prematurely in a refactor of the json/python file generation in the pzmm submodule. This should be shifted to a CAS action in the future and not be dependent upon user modules.

I'll take a look at the calculateFitStats error and see where the logic changed.

@smlindauer smlindauer added the bug Something isn't working label Jan 17, 2023
@smlindauer
Copy link
Collaborator

Both issues have been cleaned up and pushed out in v1.8.1, which is available on PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0