# US 2024/0202589 A1 · Transformation For Machine Learning Pre-Processing

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

- Number: US 2024/0202589 A1
- Document ID: US20240202589A1
- Status: Published application
- Kind: A1
- Application number: 18/415,212
- Filed: 2024-01-17
- Published: 2024-06-20
- Earliest claimed: 2019-04-08
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Jiaxun Wu; Amir Hossein Hormati
- Web page: https://patentgrep.com/patent/US20240202589A1

## CPC

- G06N 20/00: Machine learning
- G06F 16/2433: {Query languages}
- G06F 16/258: {Data format conversion from or to a database}
- G06N 5/04: Inference or reasoning models
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for transformation for machine learning pre-processing. In some implementations, an instruction to create a model is obtained. A determination is made whether the instruction specifies a transform. In response to determining that the instruction specifies a transform, a determination is made as to whether the transform requires statistics on the training data. The training data is accessed. In response to determining that the transform requires statistics on the training data, transformed training data is generated from both the training data and the statistics. A model is generated with the transformed training data. A representation of the transform and the statistics is stored as metadata for the model.

## Claims

### Claim 1

A computer-implemented method for machine learning preprocessing, the method comprising:
receiving, with one or more processors, prediction data and a model for performing a prediction;
determining, with the one or more processors, metadata for the model includes a clause specifying a transform;
generating, with the one or more processors, transformed prediction data from the prediction data using the transform;
generating, with the one or more processors, a prediction based on the transformed prediction data using the model; and
outputting, with the one or more processors, the prediction.

### Claim 2 (depends on 1)

The method of claim 1, further comprising identifying, with the one or more processors, one or more aggregate functions included in the clause that require statistics on the prediction data.

### Claim 3 (depends on 2)

The method of claim 2, further comprising generating, with the one or more processors, the statistics on the prediction data based on the one or more aggregate functions.

### Claim 4 (depends on 3)

The method of claim 3, further comprising converting, with the one or more processors, the one or more aggregate functions to one or more scalar function using the statistics.

### Claim 5 (depends on 1)

The method of claim 1, wherein generating transformed prediction data further comprises at least one of transforming columns of prediction data using bucket ranges derived from the metadata or inversing values in the columns of prediction data.

### Claim 6 (depends on 1)

The method of claim 1, wherein generating the prediction further comprises generating a prediction for each row of the transformed prediction data.

### Claim 7 (depends on 1)

The method of claim 1, further comprising receiving, with the one or more processors, a structured query language (SQL) query that contains the prediction data and the model.

### Claim 8

A system comprising:
one or more processors; and
one or more storage devices coupled to the one or more processors and storing instructions that, when executed by the one or more processors, cause the one or more processors to perform operations for machine learning preprocessing, the operations comprising:
receiving prediction data and a model for performing a prediction;
determining metadata for the model includes a clause specifying a transform;
generating transformed prediction data from the prediction data using the transform;
generating a prediction based on the transformed prediction data using the model; and
outputting the prediction.

### Claim 9 (depends on 8)

The system of claim 8, wherein the operations further comprise identifying one or more aggregate functions included in the clause that require statistics on the prediction data.

### Claim 10 (depends on 9)

The system of claim 9, wherein the operations further comprise generating the statistics on the prediction data based on the one or more aggregate functions.

### Claim 11 (depends on 10)

The system of claim 10, wherein the operations further comprise converting the one or more aggregate functions to one or more scalar function using the statistics.

### Claim 12 (depends on 8)

The system of claim 8, wherein generating transformed prediction data further comprises at least one of transforming columns of prediction data using bucket ranges derived from the metadata or inversing values in the columns of prediction data.

### Claim 13 (depends on 8)

The system of claim 8, wherein generating the prediction further comprises generating a prediction for each row of the transformed prediction data.

### Claim 14 (depends on 8)

The system of claim 8, wherein the operations further comprise receiving a structured query language (SQL) query that contains the prediction data and the model.

### Claim 15

A non-transitory computer readable medium for storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations for machine learning preprocessing, the operations comprising:
receiving prediction data and a model for performing a prediction;
determining metadata for the model includes a clause specifying a transform;
generating transformed prediction data from the prediction data using the transform;
generating a prediction based on the transformed prediction data using the model; and
outputting the prediction.

### Claim 16 (depends on 15)

The non-transitory computer readable medium of claim 15, wherein the operations further comprise identifying one or more aggregate functions included in the clause that require statistics on the prediction data.

### Claim 17 (depends on 16)

The non-transitory computer readable medium of claim 16, wherein the operations further comprise generating the statistics on the prediction data based on the one or more aggregate functions.

### Claim 18 (depends on 17)

The non-transitory computer readable medium of claim 17, wherein the operations further comprise converting the one or more aggregate functions to one or more scalar function using the statistics.

### Claim 19 (depends on 15)

The non-transitory computer readable medium of claim 15, wherein generating transformed prediction data further comprises at least one of transforming columns of prediction data using bucket ranges derived from the metadata or inversing values in the columns of prediction data.

### Claim 20 (depends on 15)

The non-transitory computer readable medium of claim 15, wherein generating the prediction further comprises generating a prediction for each row of the transformed prediction data.
