Skip to content
New issue

Have a 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

Problems with Confusion matrix #1505

Closed
JelenaKitanovic opened this issue Aug 9, 2016 · 10 comments · Fixed by #1523
Closed

Problems with Confusion matrix #1505

JelenaKitanovic opened this issue Aug 9, 2016 · 10 comments · Fixed by #1523

Comments

@JelenaKitanovic
Copy link

I cannot put Confusion matrix on canvas it shows error:

Could not create 'Confusion Matrix'

Traceback (most recent call last):
File "C:\Python34\lib\site-packages\Orange\canvas\scheme\widgetsscheme.py", line 342, in create_widget_instance
widget.init()
File "C:\Python34\lib\site-packages\Orange\widgets\evaluate\owconfusionmatrix.py", line 116, in init
callback=self._learner_changed
File "C:\Python34\lib\site-packages\Orange\widgets\gui.py", line 1254, in listBox
clist = ControlledList(clist, lb)
File "C:\Python34\lib\site-packages\Orange\widgets\gui.py", line 2254, in init
super().init(content)
TypeError: 'NoneType' object is not iterable

I used the Iris dataset, and yesterday everything worked properly. Today I can't use Confusion matrix at all.

Orange version 3.3

@JelenaKitanovic
Copy link
Author

*Version 3.3.7

@kernc
Copy link
Contributor

kernc commented Aug 9, 2016

Can you share a minimum working example workflow? On 3.3.7 with below scheme, I can't reproduce.

untitled.ows.zip

@JelenaKitanovic
Copy link
Author

Yes of course.
1
2

Thank you for your response.

@JelenaKitanovic
Copy link
Author

JelenaKitanovic commented Aug 9, 2016

Even when the canvas is empty, I get an error.
I don't have errors when I import your code with Confusion matrix, but as soon as I add new one, I have.

@JelenaKitanovic
Copy link
Author

I don't have errors anymore. I don't know why . I started Orange again a minute ago and it works. 😄

@kernc
Copy link
Contributor

kernc commented Aug 9, 2016

Do you remember what scheme you had and what you did right before the problem started manifesting?

@ajdapretnar
Copy link
Contributor

@JelenaKitanovic Is there any chance to reproduce this bug?

@gbrian
Copy link

gbrian commented Aug 22, 2016

Hi,
Same here.

Steps to reproduce:
image

  • Add multiple learners and a confusion matrix.
  • Open confusion matrix (not sure if needed)
  • Remove connection to confusion matrix before saving
  • Save
  • Reopen project

Temporal fix I done to be able to continue working:
At guy.py (line 1253) check if clist (the expected selected learner list) is None

if value is not None:
        clist = getdeepattr(master, value)
        if clist is not None and not isinstance(clist, (int, ControlledList)):
        # if not isinstance(clist, (int, ControlledList)): # original code
            clist = ControlledList(clist, lb)
            master.__setattr__(value, clist)
        setattr(master, value, clist)
        connectControl(master, value, callback, lb.itemSelectionChanged,
                       CallFrontListBox(lb), CallBackListBox(lb, master))

Hope this helps.

Great job!

@gbrian
Copy link

gbrian commented Aug 22, 2016

Hi again,
Seems that: ConfunsionMatrix is reusing settings when creating new instances.
So maybe selected_learner property should be ignored when building a new instance.

image

It breaks as soon as you create and remove a connection setting the selected_learner as None.

right?
Thanks

@janezd
Copy link
Contributor

janezd commented Aug 26, 2016

Thanks, you've really nailed it. I guess #1523 should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants