update normalisation for average kersize - #14
Merged
Merged
Conversation
Collaborator
|
please adjust |
Collaborator
|
handled comments. Tests run successfully. |
JakobCode
approved these changes
Jun 8, 2026
| # and divided by num_feas^2 ad we have that many terms | ||
| if num_feas > 0: | ||
| if num_feas > 1: | ||
| # compute 2 times sum over diams to the power p divided by num_feas^2 |
| # get mean over diams, with factor 2 due to symmetry of the norm of the compute vectors in null space of F (norm(x-z)=norm(z-x)) | ||
| # and divided by num_feas^2 ad we have that many terms | ||
| if num_feas > 0: | ||
| if num_feas > 1: |
Collaborator
There was a problem hiding this comment.
What happens for case num_feas == 1?
| if num_feas > 1: | ||
| # compute 2 times sum over diams to the power p divided by num_feas^2 | ||
| diameter_mean_y = 2*np.divide(np.sum(np.power(diam_y,p)), np.power(num_feas,2)) | ||
| diameter_mean_y = 2*np.divide(np.sum(np.power(diam_y,p)), num_feas-1) |
Collaborator
There was a problem hiding this comment.
Please double check that this is correct and align with comment above
| size_feas = len(valid_idx) | ||
| # compute average over sums of differences over twice the feasible sets | ||
| return np.divide(np.nansum(np.power(subdistXX,p_X)), np.power(size_feas,2)) | ||
| return np.divide(np.nansum(np.power(subdistXX,p_X)), size_feas-1), size_feas |
Collaborator
There was a problem hiding this comment.
please double check if correct
nm19000
added a commit
that referenced
this pull request
Jul 2, 2026
update normalisation for average kersize
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.