Skip to content

ENH: Improve cdflink, add probit, cauchy derivatives - #7226

Closed
josef-pkt wants to merge 2 commits into
statsmodels:masterfrom
josef-pkt:improve_cdflink
Closed

josef-pkt wants to merge 2 commits into
statsmodels:masterfrom
josef-pkt:improve_cdflink

Conversation

@josef-pkt

Copy link
Copy Markdown
Member

see #1878, mainly improvement to precision and speed of probit deriv2

add some analytical derivatives,
use inverse function properties for deriv2 instead of inverse_deriv2.

also removes numdiff default for inverse_deriv2 for CDFLink,
backwards incompatible, if someone has a subclass of CDFLink and relies on this.

@josef-pkt

Copy link
Copy Markdown
Member Author

The second commit to work around corner cases in binomial family is similar to #3231 for zero division,
0 log 0 is already handled by clip

scipy xlogy is pretty old by now #3231

"""
return - z * self.dbn.pdf(z)

def deriv2_(self, p):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there a trailing underscore?
was it left over from debugging?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, because this is now inherited, but if we don't want to change CDFLink base class, then we can add this directly to probi.

@josef-pkt

Copy link
Copy Markdown
Member Author

this is now superseded, split into two PRs #7286 (merged) and #7287 (still open)

@josef-pkt josef-pkt closed this Jan 27, 2021
@josef-pkt
josef-pkt deleted the improve_cdflink branch February 21, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant