def sde(y, proba, X, uniform_variables, sample_weight=None, label=1, knn=30):
    y, proba = check_arrays(y, proba)
    assert len(y) == len(proba) == len(X), 'Different lengths'

    y = column_or_1d(y)
    sample_weight = check_sample_weight(y, sample_weight=sample_weight)

    X = pandas.DataFrame(X)
    mask = y == label
    groups = computeSignalKnnIndices(uniform_variables=uniform_variables, dataframe=X, is_signal=mask, n_neighbors=knn)
    groups = groups[mask, :]

    return ut.compute_sde_on_groups(proba[:, label], mask=mask, groups_indices=groups,
                                    target_efficiencies=[0.5, 0.6, 0.7, 0.8, 0.9], sample_weight=sample_weight)
Returns the (1-tailed) probability value associated with the provided
dataset/ETHPy150Open anaderi/lhcb_trigger_ml/hep_ml/metrics.py/sde--crossover with--dataset/ETHPy150Open radlab/sparrow/src/main/python/third_party/stats.py/lchisqprob