Main Content

summary

Summary table for DriftDiagnostics object

    Description

    example

    summary(DDiagnostics) displays the multiple test correction drift status and the summary of the drift diagnostics.

    example

    S = summary(DDiagnostics) returns the table S containing the summary of the drift diagnostic results.

    Examples

    collapse all

    Generate baseline and target data with two variables, where the distribution parameters of the second variable change for target data.

    rng('default') % For reproducibility
    baseline = [normrnd(0,1,100,1),wblrnd(1.1,1,100,1)];
    target = [normrnd(0,1,100,1),wblrnd(1.2,2,100,1)];

    Perform permutation testing for any drift between the baseline and target data.

    DDiagnostics = detectdrift(baseline,target);

    Display the summary of the drift diagnostics.

    summary(DDiagnostics)
        Multiple Test Correction Drift Status: Drift
    
              DriftStatus    PValue      ConfidenceInterval  
              ___________    ______    ______________________
    
        x1     "Stable"      0.285       0.25719      0.31408
        x2     "Drift"       0.003     0.0006191     0.008742
    

    summary displays the multiple test correction drift status above the summary table. detectdrift uses the default multiple test correction method, Bonferroni, which concludes that the drift status for overall data is Drift. The summary table has two rows, one for each variable, and three columns: Drifts status, the estimated p-value, and the 95% confidence bounds for the estimated p-values. detectdrift identifies the drift status as stable for the first variable, and detects the drift in the distribution for the second variable. The upper confidence bound for the second variable is lower than the default drift threshold, 0.05, so the conclusion for that variable is Drift.

    Generate baseline and target data with two variables, where the distribution parameters of the second variable change for target data.

    rng('default') % For reproducibility
    baseline = [normrnd(0,1,100,1),wblrnd(1.1,1,100,1)];
    target = [normrnd(0,1,100,1),wblrnd(1.2,2,100,1)];

    Perform permutation testing for any drift between the baseline and target data.

    DDiagnostics = detectdrift(baseline,target);

    Save the summary of the drift diagnostics in the table S.

    S = summary(DDiagnostics)
    S=3×3 table
                        DriftStatus    PValue      ConfidenceInterval  
                        ___________    ______    ______________________
    
        x1               "Stable"      0.285       0.25719      0.31408
        x2               "Drift"       0.003     0.0006191     0.008742
        MultipleTest     "Drift"         NaN           NaN          NaN
    
    

    When you save the results in a table, summary stores the multiple test correction drift status in a row with the name MultipleTest after the variables. There is no p-value or its confidence interval associated with this correction, hence the software stores NaNs.

    If you set EstimatePValues to false in the call to detectdrift, the software does not perform any estimation or confidence interval computation. Then, S holds the name and the initial value of the metric you specify for each variable in the call to detectdrift.

    DDiagnostics = detectdrift(baseline,target,EstimatePValues=false);
    S = summary(DDiagnostics)
    S=2×2 table
              MetricValue       Metric    
              ___________    _____________
    
        x1      0.22381      "Wasserstein"
        x2      0.36879      "Wasserstein"
    
    

    Input Arguments

    collapse all

    Diagnostics of the permutation testing for drift detection, specified as a DriftDiagnostics object returned by detectdrift.

    Output Arguments

    collapse all

    Summary of the drift diagnostic results, returned as a table. By default, S has a row for each variable specified for drift detection in the call to detectdrift, plus one more row for multiple test drift status, MultipleTest. In this case, S has the following columns.

    Column nameDescription
    DriftStatusConclusion at the end of the permutation testing: Drift, Warning, or Stable
    PValueEstimated p-values
    ConfidenceIntervalConfidence intervals for the estimated p-values

    If you set the value of EstimatePValues to false in the call to detectdrift, then S does not have the row MultipleTest, and the number of rows in S is equal to the number of variables specified for drift detection. In this case, S has these columns:

    Column nameDescription
    MetricValueValue(s) of the metric(s) used in permutation testing
    MetricMetric(s) used in permutation testing

    MetricValue and Metrics.

    Version History

    Introduced in R2022a