# US 2022/0292315 A1 · Accelerated k-fold cross-validation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0292315 A1
- Document ID: US20220292315A1
- Status: Published application
- Kind: A1
- Application number: 17/199,389
- Filed: 2021-03-11
- Published: 2022-09-15
- Earliest claimed: 2021-03-11
- Assignees: Minitab, LLC
- Applicants: Minitab, LLC
- Inventors: Senin J. Banga; Robert E. Kelly
- Web page: https://patentgrep.com/patent/US20220292315A1

## CPC

- G06F 18/2193: {based on specific statistical tests}
- G06F 18/2148: {characterised by the process organisation or structure, e.g. boosting cascade}
- G06N 5/01: Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Models are k-fold cross-validated to determine how results of an analysis will generalize to an independent data set. By obtaining an inverse transformation of a set of residuals representative of a traditional repetitive train-then-test approach, models can be k-fold cross-validated in an accelerated manner to reduce computational cost and eliminate or substantially eliminate restrictions on the number of folds to include in the cross-validation.

## Claims

### Claim 1

A method comprising:
acquiring, via a predictive analytics engine of a learning machine, input data to be analyzed, the input data comprising a plurality of labeled cases;
training a model, based on a parameter estimation procedure, by using the plurality of labelled cases;
randomly dividing the plurality of labelled cases into a number of folds (k folds);
for each fold of the k folds, computing a set of corresponding predicted residuals in the fold using an inverse transformation of ordinary residuals representative of a difference between the output values of the labelled cases in the fold and their estimated or fitted values, the corresponding predicted residuals being representative of a bypassed traditional repetitive model training-then-testing process;
receiving k sets of corresponding predicted residuals; and
determining a k-fold R-square statistic using all the members of the k sets of corresponding predicted residuals, the k-fold R-square statistic being indicative of a k-fold cross-validation error of the model.

### Claim 2 (depends on 1)

The method of claim 1, wherein at least one fold of the k folds contains more than one labelled case.

### Claim 3 (depends on 1)

The method of claim 1, wherein the parameter estimation procedure is an ordinary least squares (OLS) method, and the model is a linear model.

### Claim 4 (depends on 3)

The method of claim 3, further comprising using the k-fold cross-validation error to parameter tune when pruning a regression tree wherein k-fold cross-validation is applied a plurality of times to a sequence of subtrees indexed by a first tuning parameter and a second parameter that minimizes a first cross-validated error is used to select a final pruned regression tree.

### Claim 5 (depends on 1)

The method of claim 1, wherein the parameter estimation procedure is an iterative reweighted least squares (IRLS) method and the model is a generalized linear model.

### Claim 6 (depends on 5)

The method of claim 5, further comprising using the k-fold cross-validation error to parameter tune when pruning a classification tree, wherein k-fold cross-validation is applied a plurality of times to a sequence of subtrees indexed by a third tuning parameter and a fourth parameter that minimizes a second cross-validated error is used to select a final pruned classification tree.

### Claim 7 (depends on 5)

The method of claim 5, further comprising computing the corresponding predicted residuals using a one-step approximation to deduce the parameter estimates of the generalized linear model based on all the labelled cases excluding the cases in a held-out fold from a generalized regression parameter estimation based on all labelled cases, wherein the corresponding predicted residuals are deviance residuals and wherein at least one fold of the k folds contains more than one labelled case.

### Claim 8 (depends on 1)

The method of claim 1, wherein the predictive analytics engine is a machine learning model.

### Claim 9 (depends on 5)

The method of claim 5, wherein the labelled cases comprise one or more input variables and an output variable, wherein the output variable has a distribution that is selected from the group consisting of a binomial distribution, a Poisson distribution, a gamma distribution, and a negative binomial distribution.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
generating one or more other models; and
computing other corresponding predicted residuals for each of said one or more other models; and
selecting an optimal model for the labelled cases from among the model and the one or more other models based on the model with the highest the k-fold R-square statistic or equivalently the model with smallest k-fold cross-validation error.

### Claim 11 (depends on 1)

The method of claim 1, the k folds have substantially a same size.

### Claim 12 (depends on 1)

The method of claim 1, wherein an execution time of the computing is lower than another execution time of a corresponding computation of residuals using a traditional repetitive model training-then-testing process.

### Claim 13

A non-transitory computer readable storage medium storing program instructions which, when executed by a processor, causes the processor to perform a procedure comprising the steps of:
acquiring, via a predictive analytics engine of a learning machine, input data to be analyzed, the input data comprising a plurality of labeled cases;
training a model, based on a parameter estimation procedure, by using the plurality of labelled cases;
randomly dividing the plurality of labelled cases into a number of folds (k folds);
for each fold of the k folds, computing a set of corresponding predicted residuals in the fold using an inverse transformation of ordinary residuals representative of a difference between the output values of the labelled cases in the fold and their estimated or fitted values, the corresponding predicted residuals being representative of a bypassed traditional repetitive model training-then-testing process;
receiving k sets of corresponding predicted residuals; and
determining a k-fold R-square statistic using all the members of the k sets of corresponding predicted residuals, the k-fold R-square statistic being indicative of a k-fold cross-validation error of the model.

### Claim 14 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein at least one fold of the k folds contains more than one labelled case.

### Claim 15 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein the parameter estimation procedure is an ordinary least squares (OLS) method and the model is a linear model.

### Claim 16 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein the parameter estimation procedure is an iterative reweighted least squares (IRLS) method and the model is a generalized linear model.

### Claim 17 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein the processor further performs the steps of:
generating one or more other models;
computing other corresponding predicted residuals for each of said one or more other models; and
selecting an optimal model for the labelled cases from among the model and the one or more other models based on the k-fold R-square statistic that that meets an evaluation criterion.

### Claim 18 (depends on 13)

The non-transitory computer readable storage medium of claim 13, wherein an execution time of the computing is lower than another execution time of a corresponding computation of residuals associated with said bypassed traditional repetitive model training-then-testing process.

### Claim 19

A computer system comprising:
at least one processor configured to performs the steps of:
acquiring, via a predictive analytics engine of a learning machine, input data to be analyzed, the input data comprising a plurality of labeled cases;
training a model, based on a parameter estimation procedure, by using the plurality of labelled cases;
randomly dividing the plurality of labelled cases into a number of folds (k folds);
for each fold of the k folds, computing a set of corresponding predicted residuals in the fold using an inverse transformation of ordinary residuals representative of a difference between the output values of the labelled cases in the fold and their estimated or fitted values, the corresponding predicted residuals being representative of a bypassed traditional repetitive model training-then-testing process;
receiving k sets of corresponding predicted residuals; and
determining a k-fold R-square statistic using all the members of the k sets of corresponding predicted residuals, the k-fold R-square statistic being indicative of a k-fold cross-validation error of the model.

### Claim 20 (depends on 19)

The computer system of claim 19, wherein an execution time of the computing is lower than another execution time of a corresponding computation of residuals associated with said bypassed traditional repetitive model training-then-testing process.
