Closed horvathj closed 5 years ago
If I train the model in python I get the same result as in the prediction window.
train = Orange.data.Table("train.csv")
test = Orange.data.Table("test.csv")
mlp = Orange.classification.NNClassificationLearner(hidden_layer_sizes=(1, ), solver='lbfgs', max_iter=300, random_state=3)
nn = mlp.fit(train.X,train.Y)
nn.predict(test)
(array([0., 0., 1., 1.]), array([[1.00000000e+00, 5.49156522e-13], [9.99999973e-01, 2.73501750e-08], [4.33381136e-01, 5.66618864e-01], [2.67609779e-04, 9.99732390e-01]]))
Probably the same as #3521?
Most probably. I read both issues yesterday, but obviously not carefully enough. Now it's just that you do the honour of clicking "Close". :)
This is yet another argument for #3705.
Even though @horvathj reported this first, closing as duplicate of #3521. Sorry for not figuring this out sooner.
Orange version
3.13
Expected behavior
Get same result in GUI and python when using neural network modell prediction (for binary classification).
Actual behavior
Different result in GUI. Maybe it is wrong?
Steps to reproduce the behavior
(Small files, modell with train in 2-3 seconds)
Rename to (.csv) and Load the attached train.txt file, and connect into a Neural Network modell. train.txt
Parameters for Neural Network:
3) Connect the modell in to prediction modul.
4) Rename to .csv and Load the test.csv and connect into prediciton modul. test.txt
5) Check the predictions, and retrain the neural network modell while the first 2 row is bus, and the second 2 is police. AND the third row is 0.43 : 0.57
6) Save the neural network modell into a pickle file "neural.pkcls" with Save model.
7) Activate a python environment with installed Orange and pickle packages.
8) Run this code in python:
9) The first array shows the categorisation (on my computer it is wrongly: [0., 0., 0., 1.] and the predict_proba numbers are not the same as in prediciton result table.
Additional info (worksheets, data, screenshots, ...)
If I list out the coefs and intercepts and do the MLP math in excel, I get the python results. But the GUI shows something else, what I can not understand.