# US 2003/0229635 A1 · Efficient evaluation of queries with mining predicates

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

- Number: US 2003/0229635 A1
- Document ID: US20030229635A1
- Status: Published application
- Kind: A1
- Application number: 10/161,308
- Filed: 2002-06-03
- Published: 2003-12-11
- Earliest claimed: 2002-06-03
- Assignees: Microsoft Corporation
- Inventors: Surajit Chaudhuri; Vivek Narasayya; Sunita Sarawagi
- Web page: https://patentgrep.com/patent/US20030229635A1

## CPC

- G06F 16/285: {Clustering or classification}
- G06F 2216/03: Data mining
- Y10S 707/99932: Access augmentation or optimizing
- Y10S 707/99934: Query formulation, input preparation, or translation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

A method for evaluating a user query on a database having a mining model that classifies records contained in the database into classes when the query comprises at least one mining predicate that refers to a class of database records. An upper envelope is derived for the class referred to by the mining predicate corresponding to a query that returns a set of database records that includes all of the database records belonging to the class. The upper envelope is included in the user query for query evaluation. The method may be practiced during a preprocessing phase by evaluating the mining model to extract a set of classes of the database records and deriving an upper envelope for each class. These upper envelopes are stored for access during user query evaluation.

## Claims

### Claim 1

A method for evaluating a user query on a database having a mining model that classifies records contained in the database into classes and assigns a class label to each record, wherein the query comprises at least one mining predicate that refers to a class label of database records, the method comprising the steps of:
deriving an upper envelope for the class label referred to by the mining predicate wherein the upper envelope corresponds to a query predicate that returns a set of database records that includes all of the database records having that class label assigned thereto; and
including the upper envelope with the user query for query evaluation.

### Claim 2 (depends on 1)

The method of claim 1 wherein the deriving step is performed during a preprocessing phase by:
building a mining model;
evaluating the mining model to extract a set of classes and class labels for the database records;
deriving an upper envelope for each class label while building the model; and
storing the upper envelopes for access during user query evaluation.

### Claim 3 (depends on 1)

The method of claim 1 comprising the step of forming an upper envelope by combining a plurality of upper envelopes.

### Claim 4 (depends on 3)

The method of claim 3 wherein the user query seeks to return data records whose class label is a member of a given set of class labels and wherein the upper envelope comprises a disjunct of the upper envelopes for each class label in the set of class labels referred to by the user query.

### Claim 5 (depends on 3)

The method of claim 3 wherein the database has at least two mining models and wherein the user query seeks to return data records whose class label has been assigned the same class label by all mining models and wherein the upper envelope is formed by enumerating class labels for each of the mining models, finding upper envelopes for each mining model by forming a conjunctive expression of the upper envelope for each class label in the mining model, and taking the disjunction of these conjunctive expressions over all class labels.

### Claim 6 (depends on 3)

The method of claim 3 wherein the mining model assigns a class label to a data record that predicts the value of a given column in the data record and the user query seeks to return data records in which the predicted value matches the actual value in the data column and wherein the upper envelope for that class is formed by enumerating each class label for the mining model, finding an upper envelope for each class label, forming a conjunctive expression of the upper envelope and a predicate that selects data records where the given column is equal to the class label, and forming a disjunctive expression of these conjunctive expressions over all class labels.

### Claim 7 (depends on 1)

The method of claim 1 wherein the mining model is a decision tree comprising a root node connected to test nodes having test conditions and leaf nodes having a class label and wherein the upper envelope for a given class label is derived by forming a conjunct of the test conditions between the root and each leaf node having the given class label and forming a disjunct of the conjuncts of the test conditions.

### Claim 9 (depends on 1)

The method of claim 1 wherein the mining model is a rule based learner comprising a set of if-then rules, each rule having a body comprising conditions on the data attributes and a head comprising one of the class labels and wherein the upper envelope for a given class label is derived by forming a disjunct of the rules having the given class label as the head.

### Claim 10 (depends on 1)

The method of claim 1 wherein the data records have n attributes and the mining model assigns class labels to each data record and each class label of each data record is assigned a position based on attribute values in an n dimensional space having a dimension for each attribute and wherein the upper envelope for a given class label is derived by forming a disjunct of boundaries of regions that cover all data records having the given class label.

### Claim 10 (depends on 9)

The method of claim 9 wherein the boundaries are described in terms of ranges of attribute values.

### Claim 11 (depends on 9)

The method of claim 9 wherein the upper envelope for a given class label is derived by describing an initial region that covers the entire n dimensional space, removing sub-regions that do not contain any data records having the given class label, and describing the resulting region.

### Claim 12 (depends on 11)

The method of claim 11 wherein a sub-region is removed from the initial region by calculating a probability that the data records in the sub-region have a given class label and removing the sub-region if the probability is below a predetermined threshold.

### Claim 13 (depends on 12)

The method of claim 12 wherein a probability that data records in the sub-region having a certain class label is calculated for all class labels and the upper envelope for the given class label is derived by removing a sub-region based on a comparison between the probability for the given class label and the probabilities for the other class labels.

### Claim 14 (depends on 11)

The method of claim 11 wherein sub-regions that contain data records having different class labels are shrunk and re-evaluated to determine if they should be removed.

### Claim 15 (depends on 11)

The method of claim 11 wherein sub-regions that contain data records having different class labels are split into sub-regions and the split sub-regions are re-evaluated to determine if they should be removed.

### Claim 16 (depends on 15)

The method of claim 15 wherein the sub-regions are split in a manner that minimizes entropy.

### Claim 17 (depends on 11)

The method of claim 11 comprising the step of merging sub-regions that have been removed.

### Claim 18 (depends on 9)

The method of claim 9 wherein the mining model determines each class as a centroid and a region surrounding the centroid and wherein the upper envelope for a given class label is derived by describing a set of rectangular regions that cover the region for the given class label.

### Claim 19 (depends on 1)

The method of claim 1 wherein the upper envelopes are removed prior to execution of the user query.

### Claim 20 (depends on 1)

The method of claim 1 wherein the size of the upper envelope is limited to a predetermined number of terms.

### Claim 21

A computer readable medium having computer executable instruction stored thereon for performing method steps for evaluating a user query on a database having a mining model that classifies records contained in the database into classes and assigns a class label to each record, wherein the query comprises at least one mining predicate that refers to a class label of database records, the method steps comprising:
deriving an upper envelope for the class label referred to by the mining predicate wherein the upper envelope corresponds to a query predicate that returns a set of database records that includes all of the database records having that class label assigned thereto; and
including the upper envelope with the user query for query evaluation.

### Claim 22 (depends on 21)

The computer readable medium of claim 21 wherein the deriving step is performed during a preprocessing phase by:
building a mining model;
evaluating the mining model to extract a set of classes and class labels for the database records;
deriving an upper envelope for each class label while building the model; and
storing the upper envelopes for access during user query evaluation.

### Claim 23 (depends on 21)

The computer readable medium of claim 21 wherein the method steps comprise the step of forming an upper envelope by combining a plurality of upper envelopes.

### Claim 24 (depends on 23)

The computer readable medium of claim 23 wherein the user query seeks to return data records whose class label is a member of a given set of class labels and wherein the upper envelope comprises a disjunct of the upper envelopes for each class label in the set of class labels referred to by the user query.

### Claim 25 (depends on 23)

The computer readable medium of claim 23 wherein the database has at least two mining models and wherein the user query seeks to return data records whose class label has been assigned the same class label by all mining models and wherein the upper envelope is formed by enumerating class labels for each of the mining models, finding upper envelopes for each mining model by forming a conjunctive expression of the upper envelope for each class label in the mining model, and taking the disjunction of these conjunctive expressions over all class labels.

### Claim 26 (depends on 23)

The computer readable medium of claim 23 wherein the mining model assigns a class label to a data record that predicts the value of a given column in the data record and the user query seeks to return data records in which the predicted value matches the actual value in the data column and wherein the upper envelope for that class is formed by enumerating each class label for the mining model, finding an upper envelope for each class label, forming a conjunctive expression of the upper envelope and a predicate that selects data records where the given column is equal to the class label, and forming a disjunctive expression of these conjunctive expressions over all class labels.

### Claim 27 (depends on 23)

The computer readable medium of claim 23 wherein the mining model is a decision tree comprising a root node connected to test nodes having a test condition and leaf nodes having a class label and wherein the upper envelope for a given class label is derived by forming a conjunct of the test conditions between the root and each leaf node having the given class label and forming a disjunct of the conjuncts of the test conditions.

### Claim 28 (depends on 21)

The computer readable medium of claim 21 wherein the mining model is a rule based learner comprising a set of if-then rules, each rule having a body comprising conditions on the data attributes and a head comprising one of the class labels and wherein the upper envelope for a given class label is derived by forming a disjunct of the rules having the given class label as the head.

### Claim 29 (depends on 21)

The computer readable medium of claim 21 wherein the data records have n attributes and the mining model assigns class labels to each data record and each class label of each data record is assigned a position based on attribute values in an n dimensional space having a dimension for each attribute and wherein the upper envelope for a given class label is derived by forming a disjunct of boundaries of regions that cover all data records having the given class label.

### Claim 30 (depends on 29)

The computer readable medium of claim 29 wherein the boundaries are described in terms of ranges of attribute values.

### Claim 31 (depends on 29)

The computer readable medium of claim 29 wherein the upper envelope for a given class label is derived by describing an initial region that covers the entire n dimensional space, removing sub-regions that do not contain any data records having the given class label, and describing the resulting region.

### Claim 32 (depends on 31)

The computer readable medium of claim 31 wherein sub-regions that contain data records having different class labels are shrunk and re-evaluated to determine if they should be removed.

### Claim 33 (depends on 31)

The computer readable medium of claim 31 wherein sub-regions that contain data records having different class labels are split into sub-regions and the split sub-regions are re-evaluated to determine if they should be removed.

### Claim 34 (depends on 31)

The computer readable medium of claim 31 wherein the method steps comprise the step of merging sub-regions that have been removed.

### Claim 35 (depends on 29)

The computer readable medium of claim 29 wherein the mining model determines each class as a centroid and a region surrounding the centroid and wherein the upper envelope for a given class label is derived by describing a set of rectangular regions that cover the region for the given class label.

### Claim 36

An apparatus for evaluating a user query on a database having a mining model that classifies records contained in the database into classes and assigns a class label to each record, wherein the query comprises at least one mining predicate that refers to a class label of database records, the method comprising the steps of:
means for deriving an upper envelope for the class label referred to by the mining predicate wherein the upper envelope corresponds to a query predicate that returns a set of database records that includes all of the database records having that class label associated therewith; and
means for including the upper envelope with the user query for query evaluation.

### Claim 37

The apparatus of 36 wherein the means for deriving an upper envelope does so during a preprocessing phase by:
building a mining model;
evaluating the mining model to extract a set of classes and class labels for the database records;
deriving an upper envelope for each class label while building the model; and
storing the upper envelopes for access during user query evaluation.

### Claim 38 (depends on 36)

The apparatus of claim 36 comprising means for forming an upper envelope by combining a plurality of upper envelopes.
