Open ejosowitz opened 1 week ago
Your code seems ok. Is there any issue you want to report? This line onnx_model = onnx.load_model_from_string(onx.SerializeToString())
can be replaced by onnx_model = onx
.
No issue, just thought it might be useful to share with the community (and didn’t see any other way to co tribute examples/helper code)
// Erik Josowitz, SVP Technology & Strategy AWL, LLC. //
From: Xavier Dupré @.> Sent: Thursday, November 14, 2024 1:57:52 AM To: onnx/sklearn-onnx @.> Cc: Erik Josowitz @.>; Author @.> Subject: Re: [onnx/sklearn-onnx] Helpful code for shaping classifier model ONNX output to a single probability (Issue #1135)
External Message
Your code seems ok. Is there any issue you want to report? This line onnx_model = onnx.load_model_from_string(onx.SerializeToString()) can be replaced by onnx_model = onx.
— Reply to this email directly, view it on GitHubhttps://github.com/onnx/sklearn-onnx/issues/1135#issuecomment-2475898589, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCUWYJO5YRTUUQ5EEEWLDL2ARX2BAVCNFSM6AAAAABREXW27KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZVHA4TQNJYHE. You are receiving this because you authored the thread.Message ID: @.***>
Why not submitting a PR to add this example to the documentation?
Sorry I didn’t see a place to do that
// Erik Josowitz, SVP Technology & Strategy AWL, LLC. //
From: Xavier Dupré @.> Sent: Thursday, November 14, 2024 6:29:45 AM To: onnx/sklearn-onnx @.> Cc: Erik Josowitz @.>; Author @.> Subject: Re: [onnx/sklearn-onnx] Helpful code for shaping classifier model ONNX output to a single probability (Issue #1135)
External Message
Why not submitting a PR to add this example to the documentation?
— Reply to this email directly, view it on GitHubhttps://github.com/onnx/sklearn-onnx/issues/1135#issuecomment-2476498850, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCUWYOQJMW2VC54UXQG6CD2ASXVTAVCNFSM6AAAAABREXW27KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZWGQ4TQOBVGA. You are receiving this because you authored the thread.Message ID: @.***>
That would be here: https://github.com/onnx/sklearn-onnx/tree/main/docs/examples.
Will do, appreciate it!
Erik Josowitz Sr. Vice President, Technology & Strategy, AWL, LLC President Emeritus, Consumer Consent Council Board of Directors, Insurance Marketing Coalition 9004 Anderson Mill Road |Bldg A | Austin, TX 78729 @.**@.>
Please note our new mailing address!
On Nov 14, 2024, at 6:59 AM, Xavier Dupré @.***> wrote:
External Message
That would be here: https://github.com/onnx/sklearn-onnx/tree/main/docs/examples.
— Reply to this email directly, view it on GitHubhttps://github.com/onnx/sklearn-onnx/issues/1135#issuecomment-2476598166, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCUWYPYDJHS4HFMIHDPG2L2AS3GZAVCNFSM6AAAAABREXW27KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZWGU4TQMJWGY. You are receiving this because you authored the thread.Message ID: @.***>
ok, hopefully did that right. apologies if not
Erik Josowitz Sr. Vice President, Technology & Strategy, AWL, LLC President Emeritus, Consumer Consent Council Board of Directors, Insurance Marketing Coalition 9004 Anderson Mill Road |Bldg A | Austin, TX 78729 @.**@.>
Please note our new mailing address!
On Nov 14, 2024, at 6:59 AM, Xavier Dupré @.***> wrote:
External Message
That would be here: https://github.com/onnx/sklearn-onnx/tree/main/docs/examples.
— Reply to this email directly, view it on GitHubhttps://github.com/onnx/sklearn-onnx/issues/1135#issuecomment-2476598166, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCUWYPYDJHS4HFMIHDPG2L2AS3GZAVCNFSM6AAAAABREXW27KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZWGU4TQMJWGY. You are receiving this because you authored the thread.Message ID: @.***>
I don't know if anyone else runs into this issue, but I needed a RandomForestClassifier() model converted to ONNX to only output a single probability as a float32 instead of a tuple of probabilities. Basically just wanted the probability of the positive case. Since most of this code was written by ChatGPT I figured someone else might get some use out of the result.