jpt.learning.pruning ==================== .. py:module:: jpt.learning.pruning .. autoapi-nested-parse:: Pruning criteria for JPT learning. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/jpt/learning/pruning/xi/index Classes ------- .. autoapisummary:: jpt.learning.pruning.XiPruningCriterion Package Contents ---------------- .. py:class:: XiPruningCriterion(alpha: float = 0.05, min_n: int = 30) Prune-or-split callback based on xi. Tests whether any feature-target pair shows significant functional dependence in the current partition. Under H0 (independence), sqrt(n) * xi ~ N(0, 2/5). :param alpha: significance level :param min_n: minimum samples to apply test .. py:attribute:: z_crit :type: float .. py:attribute:: min_n :type: int :value: 30 .. py:method:: __call__(jpt: JPT, partition: JPTPartition, indices: numpy.ndarray, data: numpy.ndarray) -> bool Return True to prune (stop splitting). :param jpt: the JPT being learned :param partition: current data partition :param indices: index buffer mapping positions to data rows :param data: the full training data array (n_samples x n_vars) :returns: True if the node should become a leaf