biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.85k stars 1.01k forks source link

Orange Save and load model widget #3949

Closed ghost closed 5 years ago

ghost commented 5 years ago
Orange version

Orange version - 3.22.0

Expected behavior

I am using orange, to save the model trained on orange canvas to a pickle file using the save model widget. The model gives the correct predictions when loading the test and train data during the model development. But when I save the model using the save model widget in pickle file and use it on a new canvas using load model widget, it gives the wrong output. Basically it only gives out one class for all the test data passed for prediction when using load model.

ajdapretnar commented 5 years ago

Could you please provide a minimum example?

ales-erjavec commented 5 years ago

Possibly a duplicate of gh-3521

ghost commented 5 years ago

Yes the issue posted in gh-3521 is similar with what I am facing. But I didn't get anything where it shows the issue is resolved. Can anyone direct me to the right post or link.

ajdapretnar commented 5 years ago

It is not resolved yet, unfortunately. 😞 We will discuss this at Friday's meeting.

ghost commented 5 years ago

I am writing a python script so that the pickle file generated by the orange save data widget is used in the python script. So can anyone tell me how to convert a pandas data frame into orange data table so that it can be consumed in the pickle file in the same format as it does in orange?

janezd commented 5 years ago

You need to construct an ordinary numpy array and a corresponding Domain, and pass them to Orange.data.Table.from_numpy.