biolab / orange3-prototypes

🍊 :warning: Prototype Orange widgets — only for the brave.
Other
11 stars 46 forks source link

Exception when trying to use "Significant Groups" Widget #119

Closed MichaelWakileh closed 6 years ago

MichaelWakileh commented 6 years ago
Prototypes version

0.90

Orange version

3.8.0 (git revision:58a5218)

Expected behavior

Prototype "Significant Groups" can perform a variety of statistical tests for Hypothesis Testing (i.e. Student's t-test, Mann-Whitney-U test)

Actual behavior

An exception occurs stating "'DiscreteVariable' object is not iterable"

Steps to reproduce the behavior

I have reproduced this error on several Windows 7 Systems with updated and newly installed versions of Orange Canvas.

Here is an example pipeline: Significant groups issue.ows Hit compute in the "Significant Groups" widget to cause the exception.

Additional info (worksheets, data, screenshots, ...)

Exception: TypeError: 'DiscreteVariable' object is not iterable Module: orangecontrib.prototypes.widgets.owsignificantgroups:240 Widget Name: Significant Groups Widget Module: orangecontrib.prototypes.widgets.owsignificantgroups:240 Widget Scheme: C:\Users\User\AppData\Local\Temp\ows-fmhb6s29.ows.xml Version: 3.8.0 Environment: Python 3.6.3 on Windows 7 6.1.7601 AMD64 Installed Packages: AnyQt==0.0.8, Bottleneck==1.2.1, CacheControl==0.12.3, CommonMark==0.7.4, Genesis-PyAPI==1.2.0, LTTL==2.0.6, Orange-Bioinformatics==2.6.24, Orange-Spectroscopy==0.3.2, Orange3-Associate==1.1.5, Orange3-Chemoinformatics==0.0.2, Orange3-DataFusion==0.1.11, Orange3-Datasets==0.1.5, Orange3-Geo==0.2.2, Orange3-ImageAnalytics==0.1.15, Orange3-Prototypes==0.9.0, Orange3-Text==0.3.0, Orange3-Textable-Prototypes==0.10, Orange3-Textable==3.0.7, Orange3-Timeseries==0.3.2, Orange3-spark==0.2.7, Orange3==3.8.0, Pillow==5.0.0, PyJWT==1.5.3, PySocks==1.6.7, Pygments==2.2.0, Shapely==1.6.4.post1, asn1crypto==0.23.0, attrs==17.4.0, backports.functools-lru-cache==1.4, beautifulsoup4==4.6.0, biopython==1.70, blinker==1.4, boto3==1.5.22, boto==2.48.0, botocore==1.8.36, brotlipy==0.7.0, bz2file==0.98, certifi==2017.11.5, cffi==1.11.2, chardet==3.0.4, colorama==0.3.9, colorcet==0.9.1, cryptography==2.1.4, cycler==0.10.0, decorator==4.2.1, dill==0.2.7.1, docutils==0.14, docx2txt==0.6, future==0.16.0, gensim==3.2.0, h2==2.6.2, h5py==2.7.1, hpack==3.0.0, hyper==0.7.0, hyperframe==3.2.0, idna==2.6, ipython-genutils==0.2.0, ipython==6.2.1, jedi==0.11.1, jmespath==0.9.3, joblib==0.11, jsonschema==2.6.0, jupyter-core==4.4.0, keyring==9.0, keyrings.alt==2.3, lap==0.3.0, lockfile==0.12.2, lxml==4.1.1, matplotlib==2.1.2, msgpack-python==0.5.1, nbformat==4.4.0, nltk==3.2.5, numpy==1.13.3, oauthlib==2.0.6, observable==0.3.2, odfpy==1.3.5, olefile==0.44, opusFC==1.1.0, pandas==0.22.0, parso==0.1.1, patsy==0.5.0, pdfminer3k==1.3.1, pickleshare==0.7.4, pip==9.0.1, plotly==2.3.0, pluggy==0.6.0, ply==3.10, prompt-toolkit==1.0.15, py4j==0.10.6, py==1.5.2, pyOpenSSL==17.5.0, pycountry==17.9.23, pycparser==2.18, pyparsing==2.2.0, pyqtgraph==0.10.0, pyreadline==2.1, pytest==3.3.2, python-crfsuite==0.9.2, python-dateutil==2.6.1, pytz==2017.3, pywin32==221, requests-cache==0.4.13, requests-oauthlib==0.8.0, requests==2.18.4, rfc3986==1.1.0, s3transfer==0.1.12, scikit-fusion==0.2.1, scikit-learn==0.19.1, scipy==0.19.1, serverfiles==0.2.1, setuptools-git==1.2, setuptools==36.5.0.post20170921, simhash==1.7.1, simple-wbd==0.5.1, simplegeneric==0.8.1, simplejson==3.11.1, six==1.11.0, slumber==0.7.1, smart-open==1.5.6, spectral==0.19, sqlparse==0.2.4, statsmodels==0.8.0, tornado==4.5.3, traitlets==4.3.2, tweepy==3.5.0, twython==3.6.0, typing==3.6.2, urllib3==1.22, validate-email==1.3, wcwidth==0.1.7, wheel==0.30.0, wikipedia==1.4.0, win-inet-pton==1.0.1, wincertstore==0.2, xlrd==1.1.0 Machine ID: Stack Trace: Traceback (most recent call last): File "C:\Users\User\AppData\Local\Orange3\lib\site-packages\orangecontrib\prototypes\widgets\owsignificantgroups.py", line 240, in compute for i in self.chosen_X)]) TypeError: 'DiscreteVariable' object is not iterable Local Variables: OrderedDict([('get_col', <function OWSignificantGroups.compute..get_col at 0x00000000138E42F0>), ('self', <orangecontrib.prototypes.widgets.owsignificantgroups.OWSignificantGroups object at 0x0000000012BD4168>), ('yvar', ContinuousVariable(name='sepal length', number_of_decimals=1))])

kernc commented 6 years ago

This happens when the selection consists of one single grouping variable. It's been patched now and should reach you with the next Prototypes release.

Thanks!

MichaelWakileh commented 6 years ago

Awesome, I will be looking forward to this! best regards

bernard-liew commented 5 years ago

can I ask if this widget is designed to perform simple inference between groups? Since it has no documentation.

kernc commented 5 years ago

@bernard-liew Designed to perform inference between groups of values of nominal variables and one Test Variable.