Skip to content

update normalisation for average kersize - #14

Merged
nm19000 merged 4 commits into
mainfrom
edits_norm
Jun 8, 2026
Merged

update normalisation for average kersize#14
nm19000 merged 4 commits into
mainfrom
edits_norm

Conversation

@nm19000

@nm19000 nm19000 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

No description provided.

@JakobCode

Copy link
Copy Markdown
Collaborator

please adjust

@JakobCode JakobCode closed this Jun 4, 2026
@nm19000 nm19000 reopened this Jun 4, 2026
@JakobCode

Copy link
Copy Markdown
Collaborator

handled comments. Tests run successfully.

# 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please adjust comment

# 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:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please double check that this is correct and align with comment above

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not (num_feas-1)^p ?

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please double check if correct

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

not (size_feas-1)^p ?

@nm19000
nm19000 merged commit 553489f into main Jun 8, 2026
1 check passed
@nm19000
nm19000 deleted the edits_norm branch June 8, 2026 16:09
nm19000 added a commit that referenced this pull request Jul 2, 2026
update normalisation for average kersize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants