-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Add calcLogSum, calcChoiceProbs and combined calcLogSumChoiceProbs to HARK.interpolation. #209
Conversation
Name is fine. I will get to the backlog of PRs... eventually. January at
the latest. The semester is busier than anticipated, and I will be in
Australia in December.
…On Mon, Nov 5, 2018 at 3:44 PM Patrick Kofod Mogensen < ***@***.***> wrote:
It works, and I use it in #200 <#200>
#201 <#201> #206
<#206> , and given the discussion in
#206 <#206> it seems that @mnwhite
<https://github.com/mnwhite> also do stuff with discrete choices. I'd
prefer to have it somewhere in HARK instead of repeating it in the modules
three times.
How does the name work for you @mnwhite <https://github.com/mnwhite> ? I
just chose something, but I'm actually quite indifferent. It could have
Upper in it as well I guess. Is it a problem that it also calculates the
policies?
I have some tests as well, one which can be seen at pkofod#3
<pkofod#3> , that I can add after #208
<#208> is (potentially) merged.
------------------------------
You can view, comment on, or merge this pull request online at:
#209
Commit Summary
- Add discreteEnvelope to HARK.interpolation.
File Changes
- *M* HARK/interpolation.py
<https://github.com/econ-ark/HARK/pull/209/files#diff-0> (35)
Patch Links:
- https://github.com/econ-ark/HARK/pull/209.patch
- https://github.com/econ-ark/HARK/pull/209.diff
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#209>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANUQFS1tQ30fFqQ2FTnSbDUxBkD85apiks5usKM-gaJpZM4YPOjm>
.
|
fd0c4ea
to
4f89220
Compare
@mnwhite I'd love to get some opinion wrt names. I changed the |
My preference for these functions is for the leading word to be a verb, maybe I am almost in PR-clearing mode, I swear. |
No worries, I'm fine updating the different PRs simultaneously. It would just be neat to have this merged at some point, in some form, so I don't have to add the same code in multiple PRs. There are also some changes I havn't pushed to most of them, so maybe I'll get to it before you comment :) But okay, something like |
CCP should be understood. If you don't want to use any abbreviations,
ChoiceProbs is what I use in my own work.
…On Thu, Jan 17, 2019 at 11:12 AM Patrick Kofod Mogensen < ***@***.***> wrote:
I am almost in PR-clearing mode, I swear.
No worries, I'm fine updating the different PRs simultaneously. It would
just be neat to have this merged at some point, in some form, so I don't
have to add the same code in multiple PRs. There are also some changes I
havn't pushed to most of them, so maybe I'll get to it before you comment :)
But okay, something like calcLogSum, the question is just what to call
the discrete policies / choice probabilities. calcLogSumCCPs calcLogSum
and calcCPPs ? Unless CCPs is not easily understood as conditional choice
probabilities outside of people working with discrete choice models
regularly... It's just, calcPolicies might be a bit too generic.
calcDiscretePolicies?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#209 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ANUQFW762PAmn4d6jEAfkqEQcQmY8e0Zks5vEKD2gaJpZM4YPOjm>
.
|
I endorse consistency across projects. ChoiceProbs sounds good to me.
On Thu, Jan 17, 2019 at 2:36 PM Matthew N. White <[email protected]>
wrote:
… CCP should be understood. If you don't want to use any abbreviations,
ChoiceProbs is what I use in my own work.
On Thu, Jan 17, 2019 at 11:12 AM Patrick Kofod Mogensen <
***@***.***> wrote:
> I am almost in PR-clearing mode, I swear.
>
> No worries, I'm fine updating the different PRs simultaneously. It would
> just be neat to have this merged at some point, in some form, so I don't
> have to add the same code in multiple PRs. There are also some changes I
> havn't pushed to most of them, so maybe I'll get to it before you
comment :)
>
> But okay, something like calcLogSum, the question is just what to call
> the discrete policies / choice probabilities. calcLogSumCCPs calcLogSum
> and calcCPPs ? Unless CCPs is not easily understood as conditional choice
> probabilities outside of people working with discrete choice models
> regularly... It's just, calcPolicies might be a bit too generic.
> calcDiscretePolicies?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#209 (comment)>, or
mute
> the thread
> <
https://github.com/notifications/unsubscribe-auth/ANUQFW762PAmn4d6jEAfkqEQcQmY8e0Zks5vEKD2gaJpZM4YPOjm
>
> .
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#209 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABQlf6BoXrwuMPGBt0kEtnYuvt8swtObks5vENDPgaJpZM4YPOjm>
.
--
- Chris Carroll
|
Yeah, but the work I cite is not yet public, so we are not locked into
this. Careful decisions are good. But obviously I want my variable names to
stick.
On Jan 17, 2019 8:39 PM, "Christopher Llorracc Carroll" <
[email protected]> wrote:
I endorse consistency across projects. ChoiceProbs sounds good to me.
On Thu, Jan 17, 2019 at 2:36 PM Matthew N. White <[email protected]>
wrote:
CCP should be understood. If you don't want to use any abbreviations,
ChoiceProbs is what I use in my own work.
On Thu, Jan 17, 2019 at 11:12 AM Patrick Kofod Mogensen <
***@***.***> wrote:
> I am almost in PR-clearing mode, I swear.
>
> No worries, I'm fine updating the different PRs simultaneously. It would
> just be neat to have this merged at some point, in some form, so I don't
> have to add the same code in multiple PRs. There are also some changes I
> havn't pushed to most of them, so maybe I'll get to it before you
comment :)
>
> But okay, something like calcLogSum, the question is just what to call
> the discrete policies / choice probabilities. calcLogSumCCPs calcLogSum
> and calcCPPs ? Unless CCPs is not easily understood as conditional
choice
> probabilities outside of people working with discrete choice models
> regularly... It's just, calcPolicies might be a bit too generic.
> calcDiscretePolicies?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#209 (comment)>, or
mute
> the thread
> <
>
> .
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#209 (comment)>, or
mute
the thread
<
…
.
--
- Chris Carroll
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#209 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ANUQFUGYSdmPhgo-kF0yUkJNR7Lx_1Tuks5vESXfgaJpZM4YPOjm>
.
|
Well, if you have any reservations about this particular variable name,
speak now or forever hold your peace!
On Thu, Jan 17, 2019 at 9:37 PM Matthew N. White <[email protected]>
wrote:
… Yeah, but the work I cite is not yet public, so we are not locked into
this. Careful decisions are good. But obviously I want my variable names to
stick.
On Jan 17, 2019 8:39 PM, "Christopher Llorracc Carroll" <
***@***.***> wrote:
I endorse consistency across projects. ChoiceProbs sounds good to me.
On Thu, Jan 17, 2019 at 2:36 PM Matthew N. White ***@***.***
>
wrote:
> CCP should be understood. If you don't want to use any abbreviations,
> ChoiceProbs is what I use in my own work.
>
> On Thu, Jan 17, 2019 at 11:12 AM Patrick Kofod Mogensen <
> ***@***.***> wrote:
>
> > I am almost in PR-clearing mode, I swear.
> >
> > No worries, I'm fine updating the different PRs simultaneously. It
would
> > just be neat to have this merged at some point, in some form, so I
don't
> > have to add the same code in multiple PRs. There are also some changes
I
> > havn't pushed to most of them, so maybe I'll get to it before you
> comment :)
> >
> > But okay, something like calcLogSum, the question is just what to call
> > the discrete policies / choice probabilities. calcLogSumCCPs calcLogSum
> > and calcCPPs ? Unless CCPs is not easily understood as conditional
choice
> > probabilities outside of people working with discrete choice models
> > regularly... It's just, calcPolicies might be a bit too generic.
> > calcDiscretePolicies?
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <#209 (comment)>, or
> mute
> > the thread
> > <
>
https://github.com/notifications/unsubscribe-auth/ANUQFW762PAmn4d6jEAfkqEQcQmY8e0Zks5vEKD2gaJpZM4YPOjm
> >
> > .
> >
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#209 (comment)>, or
mute
> the thread
> <
https://github.com/notifications/unsubscribe-auth/ABQlf6BoXrwuMPGBt0kEtnYuvt8swtObks5vENDPgaJpZM4YPOjm
>
> .
>
--
- Chris Carroll
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#209 (comment)>, or
mute
the thread
<
https://github.com/notifications/unsubscribe-auth/ANUQFUGYSdmPhgo-kF0yUkJNR7Lx_1Tuks5vESXfgaJpZM4YPOjm
>
.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#209 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABQlf-X8ppfvxt6cNrEZ3yQCW8eJVbK_ks5vETNegaJpZM4YPOjm>
.
--
- Chris Carroll
|
I like ChoiceProbs over any of my own suggestions, so I'm going to try to go with that. If Matt starts doubting his own past judgement, I'll be happy to follow suit. As long as we don't send out a release with the name included, we can always change it. |
I made adjustments according to the discussion. I've added some simple tests, but more can always be added. Especially for the "shocked" case, where there are none, but there are some values we can check with some simple inputs (related to the mean of the extreme value distribution) at a later point. Almost no functionality have tests so far anyway, so I don't think that should hold back the PR. I just want to get the name right, and then start using the functionality out of HARK.interpolation in the different PRs to avoid repetition of code / bugs in some versions. |
I just added a tiny commit with a comment block. I thought that would edit your branch, but it made a new pr/209 branch. I will merge that in, then close this PR. |
For release notes: calcLogSum, calcChoiceProbs, calcLogSumChoiceProbs added to HARK.interpolation |
It works, and I use it in #200 #201 #206 , and given the discussion in #206 it seems that @mnwhite also do stuff with discrete choices. I'd prefer to have it somewhere in HARK instead of repeating it in the modules three times.
How does the name work for you @mnwhite ? I just chose something, but I'm actually quite indifferent. It could have
Upper
in it as well I guess. Is it a problem that it also calculates the policies?I have some tests as well, one which can be seen at pkofod#3 , that I can add after #208 is (potentially) merged.