Comments (5)
The value of the EvaluationResponse@id
attribute is the same as the EvaluationRequest@id
attribute. Does your evaluation request JSON object have a non-null Id?
I just tested relevant Openscoring REST API endpoints using the curl
command-line application (copy-pasted examples from the README file) and everything works just fine. Have you tested your CSV file with the curl
command-line application already?
What is your "requests" Python package version?
from openscoring-python.
I haven't tried cURL yet, once I try sending a request to /csv I'll post the results. My requests library version is 2.18.4.
Thanks
from openscoring-python.
I just tested using cURL and the /csv with
curl -X POST --data-binary @features.csv -H "Content-type: text/plain; charset=UTF-8" http://localhost:8080/openscoring/model/testmodel/csv > curl_output.csv
and it looks like from cURL the ID's are processed correctly:
head curl_output.csv
id,true_label,probability_0,probability_1
57977,0,0.9991488452182992,8.511547817011017E-4
31721,0,0.9779992879224841,0.022000712077515847
55943,0,0.9779992879224841,0.022000712077515847
35826,0,0.9929877781321543,0.00701222186784629
This is using the same file as previously. I'm not sure why curl and python would give different results?
from openscoring-python.
I have added a unit test to demonstrate that everything works as advertised:
https://github.com/openscoring/openscoring-python/blob/master/openscoring/tests/__init__.py#L12-L51
In my computer, this test passes cleanly with Python 2.7 (+requests 2.10) and Python 3.4 (+requests 2.18):
$ cd openscoring-python
$ nosetests-2.7
$ nosetests-3.4
The output on both cases is this:
Ran 7 tests in 0.281s
OK
Also, there's a new method Openscoring.evaluateDataFrame(id, df)
, which deals with in-memory Pandas' DataFrame
objects (as opposed to CSV files). Their formatting and parsing uses fixed delimiter and quote chars, and therefore should be less error prone.
Anyway, my resolution is that the Openscoring-Python client library is correct, and the problem is located somewhere in your computer.
from openscoring-python.
I will continue to look at my setup, it does seem like it's something in my system. Thanks for adding the evaluateDataFrame method. I look forward to trying it out.
Thanks for all your help!
from openscoring-python.
Related Issues (12)
- Add Pandas' DataFrame support to CSV evaluation function
- Connection refused HOT 6
- the same question 0.5.0 xgbValue is not defined HOT 1
- The web server at http://localhost:8080/openscoring did not identify itself as Openscoring/2.0 service HOT 5
- ConnectionError: HTTPConnectionPool(host='localhost', port=8080) HOT 9
- No JSON Object could be decoded HOT 3
- The `Openscoring.deploy` method throws exception "No Json Object could be decoded" HOT 2
- Package requirements not updated
- How to evaluate model with many records at once? HOT 6
- Openscoring for Regression Pmml model prediction HOT 3
- How to get prediction probabilities? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openscoring-python.