Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add max_iter to while condition in eff_nbr_tests #6

Open
sinarueeger opened this issue Apr 1, 2019 · 0 comments
Open

Add max_iter to while condition in eff_nbr_tests #6

sinarueeger opened this issue Apr 1, 2019 · 0 comments

Comments

@sinarueeger
Copy link
Owner

Something like

eff_nbr_tests <- function(..., max_iter = 100)
{
...
  K <- 1
  while (sum.tp / sum(svd.data$d) < 0.995 & K < k_iteration) {
    zhc.correction <- zhc.correction + 1
    sum.tp <- sum.tp + svd.data$d[zhc.correction]
    K <- K + 1
  }
if(K == max_iter) message("max_iter reached, but ")

}
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

No branches or pull requests

1 participant