check_converged: check_converged

View source: R/check_converged.R

check_convergedR Documentation

check_converged

Description

Internal function to check CorEx convergence. For the first 10 iterations convergence is not checked. After this, the absolute mean difference between the 5 most recent estimations of TC, and the 5 iterations previous to that again is calculated. Convergence is considered achieved if the difference is less than the value of the eps variable.

Usage

check_converged(tc_history, eps)

Arguments

tc_history

A list recording the calculated total correlation for each loop iteration.

eps

Defines the change in total correlation (TC) needed to signal convergence.

Value

Returns a boolean with TRUE signalling convergence and FALSE signalling no convergence.


jpkrooney/rcorex documentation built on July 25, 2022, 1:37 a.m.