jpt.learning.dependency.xi ========================== .. py:module:: jpt.learning.dependency.xi .. autoapi-nested-parse:: Xi-correlation-based dependency discovery. Uses Chatterjee's xi coefficient to determine which feature-target pairs exhibit statistically significant functional dependence. Classes ------- .. autoapisummary:: jpt.learning.dependency.xi.XiDependencyDiscovery Module Contents --------------- .. py:class:: XiDependencyDiscovery(alpha: float = 0.05) Bases: :py:obj:`jpt.learning.dependency.base.DependencyDiscovery` Dependency discovery via Chatterjee's xi. Computes the xi correlation between all feature-target pairs and retains only those where the correlation is statistically significant under the asymptotic null distribution of xi. Under H0 (independence with continuous Y), sqrt(n) * xi ~ N(0, 2/5). :param alpha: significance level for the independence test .. py:attribute:: alpha :type: float :value: 0.05 .. py:method:: __call__(data: numpy.ndarray, features: list[jpt.variables.Variable], targets: list[jpt.variables.Variable], variables: list[jpt.variables.Variable]) -> dict[jpt.variables.Variable, list[jpt.variables.Variable]] Discover dependencies via xi correlation. :param data: data array (n x d) :param features: list of feature Variables :param targets: list of target Variables :param variables: list of all Variables :returns: dict mapping features to their dependent targets .. py:method:: to_json() -> dict[str, Any] Serialize configuration. :returns: JSON-serializable dict .. py:method:: from_json(data: dict[str, Any]) -> XiDependencyDiscovery :classmethod: Restore from JSON. :param data: dict from ``to_json()`` :returns: XiDependencyDiscovery instance