Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4840 +/- ##
==========================================
+ Coverage 81.32% 81.38% +0.05%
==========================================
Files 581 581
Lines 90192 90214 +22
Branches 9361 10083 +722
==========================================
+ Hits 73350 73417 +67
+ Misses 14545 14504 -41
+ Partials 2297 2293 -4
Continue to review full report at Codecov.
|
|
Need a minimial test that shows that the code executes when samples have different sizes. |
| self.dist, ax=ax, line=line, | ||
| **plotkwargs) | ||
| if self.nobs < other.nobs: | ||
| finv = interp1d([(i+1) / other.nobs for i in range(other.nobs)], other.sorted_data) |
There was a problem hiding this comment.
This problem is completely symmetric. I should be possible to always fix the long series and then just call a single version of _do_plot
| **plotkwargs) | ||
|
|
||
| else: | ||
| fig, ax = _do_plot(other.sample_percentiles, |
There was a problem hiding this comment.
Just use a single call here fo the forms
fig, ax = _do_plot(other_percentiles,
self_percentiles,
dist, ax=ax, line=line,
**plotkwargs)
and then define other_percentiles, self_percentiles and dist correctly depending on the sample lengths.
There was a problem hiding this comment.
Yes, agreed. Will work on making that change.
Since within the if and elif statements we've already computed the corresponding quantiles for the larger sample in sorted order, would you recommend passing these directly to _do_plot instead of initializing a new ProbPlot and recomputing the percentiles?
Regarding the dist parameter, my understanding from looking over the code is that this is a theoretical distribution which wouldn't change depending on sample size and so we could leave this alone, but please let me know if I'm mistaken on this.
I'll also put together a minimal test for the proposed change.
|
It seems my tests are failing and I haven't been able to identify the issue. Any ideas as to what the cause might be? |
|
Here is the fix.
if self.nobs < other.nobs:
finv = interp1d([(i+ 1.0) / other.nobs for i in range(other.nobs)],
other.sorted_data)
q = finv([(i+1.0) / self.nobs for i in range(self.nobs)])
self_percentiles = self.sample_percentiles
other_percentiles = q
elif other.nobs < self.nobs:
finv = interp1d([(i+1.0) / self.nobs for i in range(self.nobs)],
self.sorted_data)
q = finv([(i+1.0) / other.nobs for i in range(other.nobs)])
self_percentiles = q
other_percentiles = other.sample_percentiles |
|
Great, thanks so much. |
|
LGTM is broken and should be ignored. Only appveyor and travis really matter. |
|
@bashtage I noticed that there seem to be merge conflicts for this pull request, is this something that I should resolve (I am still very new to making pull requests, this was actually my first ever)? |
|
@bashtage It seems that the merge conflict stems from a couple aesthetic / readability changes I made to |
|
You need to rebase your commit ontop of master. It can be a bit tricky. You can do git add remote upstream https://github.com/statsmodels/statsmodels If something goes wrong you can do git rebase --abort instead of --continue |
|
You you think you need help I or @josef-pkt could do the rebase. |
|
@bashtage Ok, I will try this. Should it be |
|
Yes, you are right.
…On Sun, Aug 19, 2018 at 12:13 AM Daniel Saxton ***@***.***> wrote:
@bashtage <https://github.com/bashtage> Ok, I will try this. Should it be git
remote add upstream... rather than git add remote upstream... by chance?
I get an error with the latter command.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4840 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFU5ReFwWxCUymY2NlT_zAVRBBigHIBHks5uSJ-jgaJpZM4VxVnW>
.
|
|
Ok, I'm trying to manually resolve a merge conflict and I notice the test decorators seem to have gone from |
|
Yes, please.
…On Sun, Aug 19, 2018, 00:20 Daniel Saxton ***@***.***> wrote:
Ok, I'm trying to manually resolve a merge conflict and I notice the test
decorators seem to have gone from @skipif... to @pytest.mark.skipif...,
so I'm assuming I should use the pytest decorators.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4840 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFU5RRCLMw2z3jKEOs4n45zgwSRA8Udwks5uSKFCgaJpZM4VxVnW>
.
|
|
Thanks, hopefully I didn't botch that. |
|
@bashtage It looks like the checks failed because of a test |
|
These are unrelated to your code changes. @josef-pkt I think this is ready. |
|
@josef-pkt Are there any additional changes I should make to this pull request? |
|
@dsaxton Did you mean to close this? I think it is ready and will get merged. Merging can be very slow around here, but it doesn't mean that it isn't welcome. |
|
I would like to get this or something like this into statsmodels in the next week. |
|
It was an accident. I reset my local master branch to resemble upstream master when creating a new branch for another pull request, but forgot that it would also reset these changes. |
This tries to address issue #4832 where
qqplot_2samplesrequires that both samples have the same size. Here if the function encounters samples of differing length it calculates the quantile function for the larger sample and then takes the estimated quantiles corresponding to the smaller sample using linear interpolation. These two samples (which now are of equal length) are then plotted in the usual way.