How to use the tigramite.independence_tests.CondIndTest.__init__ function in tigramite

To help you get started, we’ve selected a few tigramite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jakobrunge / tigramite / tigramite / independence_tests.py View on Github external
def __init__(self, **kwargs):
        self._measure = 'par_corr'
        self.two_sided = True
        self.residual_based = True

        CondIndTest.__init__(self, **kwargs)
github jakobrunge / tigramite / tigramite / independence_tests.py View on Github external
def __init__(self,
                 n_symbs=None,
                 significance='shuffle_test',
                 sig_blocklength=1,
                 conf_blocklength=1,
                 **kwargs):
        # Setup the member variables
        self._measure = 'cmi_symb'
        self.two_sided = False
        self.residual_based = False
        self.recycle_residuals = False
        self.n_symbs = n_symbs
        # Call the parent constructor
        CondIndTest.__init__(self,
                             significance=significance,
                             sig_blocklength=sig_blocklength,
                             conf_blocklength=conf_blocklength,
                             **kwargs)

        if self.verbosity > 0:
            print("n_symbs = %s" % self.n_symbs)
            print("")

        if self.conf_blocklength is None or self.sig_blocklength is None:
            warnings.warn("Automatic block-length estimations from decay of "
                          "autocorrelation may not be sensical for discrete "
github jakobrunge / tigramite / tigramite / independence_tests.py View on Github external
def __init__(self,
                 num_f=25,
                 approx="lpd4",
                 seed=42,
                 significance='analytic',
                 **kwargs):
        # Set the members
        self.num_f = num_f
        self.approx = approx
        self.seed = seed
        self._measure = 'rcot'
        self.two_sided = False
        self.residual_based = False
        self._pval = None
        # Call the parent constructor
        CondIndTest.__init__(self, significance=significance, **kwargs)

        # Print some information
        if self.verbosity > 0:
            print("num_f = %s" % self.num_f + "\n")
            print("approx = %s" % self.approx + "\n\n")
github jakobrunge / tigramite / tigramite / independence_tests.py View on Github external
def __init__(self,
                 null_dist_filename=None,
                 gp_version='new',
                 gp_params=None,
                 **kwargs):
        self._measure = 'gp_dc'
        self.two_sided = False
        self.residual_based = True
        # Call the parent constructor
        CondIndTest.__init__(self, **kwargs)
        # Build the regressor
        self.gauss_pr = GaussProcReg(self.sig_samples,
                                     self,
                                     gp_version=gp_version,
                                     gp_params=gp_params,
                                     null_dist_filename=null_dist_filename,
                                     verbosity=self.verbosity)

        if self.verbosity > 0:
            print("null_dist_filename = %s" % self.gauss_pr.null_dist_filename)
            print("gp_version = %s" % self.gauss_pr.gp_version)
            if self.gauss_pr.gp_params is not None:
                for key in  list(self.gauss_pr.gp_params):
                    print("%s = %s" % (key, self.gauss_pr.gp_params[key]))
            print("")
github jakobrunge / tigramite / tigramite / independence_tests.py View on Github external
shuffle_neighbors=5,
                 significance='shuffle_test',
                 transform='ranks',
                 n_jobs=-1,
                 **kwargs):
        # Set the member variables
        self.knn = knn
        self.shuffle_neighbors = shuffle_neighbors
        self.transform = transform
        self._measure = 'cmi_knn'
        self.two_sided = False
        self.residual_based = False
        self.recycle_residuals = False
        self.n_jobs = n_jobs
        # Call the parent constructor
        CondIndTest.__init__(self, significance=significance, **kwargs)
        # Print some information about construction
        if self.verbosity > 0:
            if self.knn < 1:
                print("knn/T = %s" % self.knn)
            else:
                print("knn = %s" % self.knn)
            print("shuffle_neighbors = %d\n" % self.shuffle_neighbors)