How to use the causality.inference.search.__init__.SearchException function in causality

To help you get started, we’ve selected a few causality 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 akelleh / causality / causality / inference / search / __init__.py View on Github external
def separating_set(self, xi, xj, data=None, variable_types=None):
        if not self.separating_sets and data and variable_types:
            if not self._g:
                self._build_g(variable_types)
            self._find_skeleton(data, variable_types)
        elif not self.separating_sets and not (data and variable_types):
            raise SearchException("Can't measure separating sets: Need data and var types.")
        if (xi,xj) in self.separating_sets:
            return self.separating_sets[(xi,xj)]
        elif (xj,xi) in self.separating_sets:
            return self.separating_sets[(xj,xi)]
        else:
            return False