Main Content

summary

Summary table for DriftDiagnostics object

Since R2022a

    Description

    example

    summary(DDiagnostics) displays the multiple test correction drift status and the summary of the drift diagnostics returned by the detectdrift function.

    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 the 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 determines that the drift status for the overall data is Drift. The summary table has two rows, one for each variable, and three columns containing the drift status, estimated p-value, and 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 of 0.05, so the drift status for this variable is Drift.

    Generate baseline and target data with two variables, where the distribution parameters of the second variable change for the 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 MultipleTest below the variables. The multiple test correction has no p-value or confidence interval, so the function stores NaNs.

    If you set EstimatePValues to false in the call to detectdrift, the software does not perform any estimation or confidence interval computation. In this case, S stores the name and 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 includes a row for each variable specified for drift detection in the call to detectdrift, and a row for the multiple test drift status, MultipleTest. In this case, S has the following columns.

    Column NameDescription
    DriftStatusDrift status 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 the following columns.

    Column NameDescription
    MetricValueValue of the metric used in permutation testing
    MetricMetric used in permutation testing

    Version History

    Introduced in R2022a