Skip to content

Commit

Permalink
Check all singulars
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Jan 8, 2025
1 parent f7064f9 commit 0dc3f2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ert/analysis/misfit_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_nr_primary_components(
# We compute the cumulative sum of these, then divide by their total sum to get the
# cumulative proportion of variance explained by each successive component.
variance_ratio = np.cumsum(singulars**2) / np.sum(singulars**2)
return max(len([1 for i in variance_ratio[:-1] if i < threshold]), 1)
return max(len([1 for i in variance_ratio if i < threshold]), 1)


def cluster_responses(
Expand Down

0 comments on commit 0dc3f2f

Please sign in to comment.