Skip to content

Logpdf and score characteristicks#74

Open
MyznikovFD wants to merge 6 commits intomainfrom
logpdf-characteristicks
Open

Logpdf and score characteristicks#74
MyznikovFD wants to merge 6 commits intomainfrom
logpdf-characteristicks

Conversation

@MyznikovFD
Copy link
Collaborator

No description provided.

@Desiment
Copy link
Contributor

Desiment commented Mar 1, 2026

I guess there can be inconsistency in calculating score function. As far as i remember, the current pipeline for computation works like this:

  1. cast to base parametrization;
  2. compute
  3. return

But, gradients of functions with respect to parameters will be different in different parametrizations (more specifically they will differ by multiplication of gradient on Jacobi matrix of mapping between parametrizations). I do not know how handle this problem correctly, but

  1. this at least should be covered in tests and docstrings
  2. this is not quite related to this PR, and seems as more sophisticated task to do

Probably need help of @LeonidElkin

Copy link
Collaborator

@LeonidElkin LeonidElkin left a comment

Choose a reason for hiding this comment

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

lgtm. There are no special questions about the code. Mathematical correctness requires approval from @Desiment . Don't make six commits, one will be enough

Comment on lines +216 to +217
width = b - a
return np.where((x >= a) & (x <= b), -np.log(width), -np.inf)
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to create another variable if you use it only once in the expression and it is so small

LeonidElkin

This comment was marked as duplicate.

LeonidElkin

This comment was marked as duplicate.

LeonidElkin

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core.families Enhancement New feature or request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants