# US 2020/0394461 A1 · Generating training sets to train machine learning models

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

- Number: US 2020/0394461 A1
- Document ID: US20200394461A1
- Status: Published application
- Kind: A1
- Application number: 16/438,837
- Filed: 2019-06-12
- Published: 2020-12-17
- Earliest claimed: 2019-06-12
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Pathirage D. S. U. Perera; Eitan D. Farchi; Orna Raz; Ramani Routray; Sheng Hua Bao; Marcel Zalmanovici
- Web page: https://patentgrep.com/patent/US20200394461A1

## CPC

- G06N 20/00: Machine learning
- G06F 16/93: Document management systems
- G06F 18/2148: {characterised by the process organisation or structure, e.g. boosting cascade}
- G06F 18/2321: using statistics or function optimisation, e.g. modelling of probability density functions
- G06F 18/24137: {Distances to cluster centroïds}
- G06N 7/01: Probabilistic graphical models, e.g. probabilistic networks
- G06V 10/768: {using context analysis, e.g. recognition aided by known co-occurring patterns}
- G06V 30/19147: {Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting}
- G06V 30/40: Document-oriented image-based pattern recognition
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A computer system trains a machine learning model. A vector representation is generated for each document in a collection of documents. The documents are clustered based on the vector representations of the documents to produce a plurality of clusters. A training set is produced by selecting one or more documents from each cluster, wherein the selected documents represent a sample of the collection of documents to train the machine learning model. The machine learning model is trained by applying the training set to the machine learning model. Embodiments of the present invention further include a method and program product for training a machine learning model in substantially the same manner described above.

## Claims

### Claim 1

A computer-implemented method of training a machine learning model comprising:
generating, via a processor, a vector representation for each document in a collection of documents;
clustering, via the processor, the documents based on the vector representations of the documents to produce a plurality of clusters;
producing, via the processor, a training set by selecting one or more documents from each cluster, wherein the selected documents represent a sample of the collection of documents to train the machine learning model; and
training the machine learning model, via the processor, by applying the training set to the machine learning model.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein selecting the one or more documents from each cluster further comprises:
selecting the one or more documents from each cluster over a plurality of iterations based on selection criteria, wherein the selection criteria for each iteration include one of closest to a centroid, farthest from the centroid, and a random selection.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the vector representation for each document is generated by applying a latent Dirichlet allocation model, and wherein the vector representation for each document indicates associations of the document to corresponding topics.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the vector representation for each document is generated based on dictionaries with keywords, and wherein the vector representation for each document indicates terms of the document in the dictionaries.

### Claim 5 (depends on 3)

The computer-implemented method of claim 3, further comprising:
determining the topics by applying a density function of the latent Dirichlet allocation model;
ordering the documents of each topic based on a distance of the document to that topic;
generating a position vector for each document based on a position of the document in the order for each topic; and
selecting the documents for the training set based on the position vectors of the documents.

### Claim 6 (depends on 3)

The computer-implemented method of claim 3, further comprising:
labelling the selected documents with a corresponding topic based on the indicated associations to corresponding topics in response to an absence of topic labels for the selected documents.

### Claim 7

A computer system for training a machine learning model, the computer system comprising:
one or more computer processors;
one or more computer readable storage media;
program instructions stored on the one or more computer readable storage media for execution by at least one of the one or more computer processors, the program instructions comprising instructions to:
generate a vector representation for each document in a collection of documents;
cluster the documents based on the vector representations of the documents to produce a plurality of clusters;
produce a training set by selecting one or more documents from each cluster, wherein the selected documents represent a sample of the collection of documents to train the machine learning model; and
train the machine learning model by applying the training set to the machine learning model.

### Claim 8 (depends on 7)

The computer system of claim 7, wherein the program instructions to select the one or more documents from each cluster further comprise instructions to:
select the one or more documents from each cluster over a plurality of iterations based on selection criteria, wherein the selection criteria for each iteration include one of closest to a centroid, farthest from the centroid, and a random selection.

### Claim 9 (depends on 7)

The computer system of claim 7, wherein the vector representation for each document is generated by applying a latent Dirichlet allocation model, and wherein the vector representation for each document indicates associations of the document to corresponding topics.

### Claim 10 (depends on 7)

The computer system of claim 7, wherein the vector representation for each document is generated based on dictionaries with keywords, and wherein the vector representation for each document indicates terms of the document in the dictionaries.

### Claim 11 (depends on 9)

The computer system of claim 9, further comprising instructions to:
determine the topics by applying a density function of the latent Dirichlet allocation model;
order the documents of each topic based on a distance of the document to that topic;
generate a position vector for each document based on a position of the document in the order for each topic; and
select the documents for the training set based on the position vectors of the documents.

### Claim 12 (depends on 9)

The computer system of claim 9, further comprising instructions to:
label the selected documents with a corresponding topic based on the indicated associations to corresponding topics in response to an absence of topic labels for the selected documents.

### Claim 13

A computer program product for training a machine learning model, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computer to cause the computer to:
generate a vector representation for each document in a collection of documents;
cluster the documents based on the vector representations of the documents to produce a plurality of clusters;
produce a training set by selecting one or more documents from each cluster, wherein the selected documents represent a sample of the collection of documents to train the machine learning model; and
train the machine learning model by applying the training set to the machine learning model.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the program instructions to select the one or more documents from each cluster further comprise instructions to:
select the one or more documents from each cluster over a plurality of iterations based on selection criteria, wherein the selection criteria for each iteration include one of closest to a centroid, farthest from the centroid, and a random selection.

### Claim 15 (depends on 13)

The computer program product of claim 13, wherein the vector representation for each document is generated by applying a latent Dirichlet allocation model, and wherein the vector representation for each document indicates associations of the document to corresponding topics.

### Claim 16 (depends on 13)

The computer program product of claim 13, wherein the vector representation for each document is generated based on dictionaries with keywords, and wherein the vector representation for each document indicates terms of the document in the dictionaries.

### Claim 17 (depends on 15)

The computer program product of claim 15, further comprising instructions to:
determine the topics by applying a density function of the latent Dirichlet allocation model;
order the documents of each topic based on a distance of the document to that topic;
generate a position vector for each document based on a position of the document in the order for each topic; and
select the documents for the training set based on the position vectors of the documents.

### Claim 18 (depends on 15)

The computer program product of claim 15, further comprising instructions to:
label the selected documents with a corresponding topic based on the indicated associations to corresponding topics in response to an absence of topic labels for the selected documents.
