Repository navigation
ENH: using human-readable group names instead of integer ids in MultiComparison - #1472
Conversation
|
Thanks, that would be a good improvement. Did you miss any commits in this PR? There is only one import change here. |
|
I did indeed. That's what happens when one commits late at night. |
|
I think this looks good, as far as I can see from browsing the code. Can you add a unit test for this? just a simple example as in the description of this issue. |
|
possible as extra unittest: MultiComparison has a define |
|
took me some time to find the unit tests for tuckeyhsd: |
|
I was just going to ask if there is a particular module that the tests should go to. I'll add a unit test for both my changes and |
…also tests the human-readable labels in TukeyHSDResults are in the right order
|
Done. |
|
Not sure why the build is failing. All tests in that particular file pass on my machine under both Python 2.7 and 3.3 on my machine |
|
@mbatchkarov Thanks for this The test failure on python 3 is because we are mixing bytes and strings. my guess we have to put a |
|
also we need a smoke test for the aside: Skipper was working on unicode support in another pull request that might affect how we handle this, but we can finish this PR without it. |
|
It might be worth considering |
|
The plan is to move to common codebase for py2 py3 soon. Actually, bashtage started to work on it two days ago. (My impression is that we will not be using six, scipy dropped most of the code from their copy of six, and I prefer the alternative where we write idiomatic py3 as much as possible, and get it to work on py 2, instead of the other way around.) |
It doesn't avoid the issue, we just get additional helper functions. We still have to decide in each case whether we want to use |
|
I've altered the test slightly in the hope it will pass under Python 3. On a related note, I don't understand how any of the tests pass under Python 3. I'm unable to get the same environment that Travis uses on my machine, but when I manually running |
|
for running python 3: did you install it with setupy.py install? The source is correctly translated by 2to3 to get it to run on python 3. However, the example folders are not included in the 2to3 translation, (One of the example folders is included in the source distribution and causes many warnings, but that doesn't affect the non-examples code, and example folders are not used by the test suite.) |
|
with the latest changes, both py 2.7 and py 3.2 are green. |
|
Yes, it looks like the PR is ready to merge now (assuming the community is happy with the test, of course) |
|
Can you rebase this on master? We've upgraded travis and it will give us a better idea of testing. |
|
Everything should be fine with this. The only change we might want to do: Usually we don't use |
|
Ok, then I'm going to merge. We can fix any unanticipated failures on fuller test suite. |
ENH: Human-readable group names instead of integers in MultiComparison
|
Merged. Thanks. |
|
Suspected there might be some 2.6 problems here... |
ENH: Human-readable group names instead of integers in MultiComparison
In the current pip version, the output of line 145 in
statsmodels.examples.try_tukey_hsd.pylooks like this:Note the first and second column contain integer indices even though the
tukeyhsdis passed a string array. This makes the table hard to read. With my changes, the output looks like this:I've applied the came change to
MultiComparison.allpairtest