User segmentation using predictive model interpretation
Systems and methods are disclosed herein for determining user segments created by a predictive model based on user behavioral data. A data analysis application executing on a computing device receives training data and a user input defining an outcome of interest. The data analysis application trains a predictive model with the training data and the outcome of interest. The data analysis application generates input data for each of a set of conditions determined from the training data. The data analysis application receives predicted outcome from the predictive model based on the input data. The data analysis application determines the relevance of the condition based on a comparison of the predicted outcome and the outcome of interest. The data analysis application generates a user segment that comprises a condition from the set of conditions based on the relevance of the condition.
1 . A computer-implemented method for determining user segments created by a trained predictive model based on user behavioral data, the method comprising:
accessing, by a computing device, an outcome of interest and training data comprising a plurality of instances of user interaction data, each instance of the user interaction data associated with a user interaction within a computer network and comprising a plurality of attributes and an outcome associated with the user interactions, wherein the outcome of interest and the training data were previously used to train a trained predictive model;
generating, by the computing device, a set of conditions from the training data, each condition comprising an attribute and a range of values for the attribute;
generating, by the computing device, multiple instances of input data from the training data, wherein the multiple instances of input data are associated with the set of conditions, and wherein each instance of input data comprises at least one instance of user interaction data from the training data satisfying a corresponding condition;
determining, by the computing device, a set of relevant conditions from the set of conditions based on relevance to the outcome of interest according to the trained predictive model, wherein determining the set of relevant conditions comprises:
selecting a first condition related to a first attribute;
causing the trained predictive model to compute, using a first instance of the multiple instances of input data corresponding to the first condition, a first predicted outcome;
determining a first relevance of the first condition by comparing the outcome of interest to the first predicted outcome;
including the first condition in the set of relevant conditions, based on the first relevance;
selecting a second condition related to a second attribute;
causing the trained predictive model to compute, using a second instance of the multiple instances of input data corresponding to the second condition, a second predicted outcome;
determining a second relevance of the second condition by comparing the outcome of interest to the second predicted outcome; and
excluding the second condition from the set of relevant conditions, based on the second relevance;
generating, by the computing device, a user segment associated with the set of relevant conditions; and
presenting, by the computing device, the user segment to an interface.
2 . The method of claim 1 , wherein generating the set of conditions further comprises:
extracting each condition present in each instance of the user interaction data, and
aggregating each condition into the set of conditions.
3 . The method of claim 1 , further comprising determining a relevance of the user segment based on a predicted outcome from the trained predictive model given the set of relevant conditions associated with the user segment.
4 . The method of claim 3 , further comprising:
generating a second user segment; and
determining, based on the relevance of the user segment and a relevance of the second user segment, an optimal set of user segments, the optimal set of user segments comprising at least one of the user segment and the second user segment, wherein the optimal set of user segments are user segments that are most relevant to the outcome of interest.
5 . The method of claim 4 , further comprising:
determining, by the computing device, that the second user segment is redundant compared to the user segment; and
removing, by the computing device, the second user segment from the optimal set of user segments.
6 . The method of claim 4 , further comprising processing the user segment to remove redundant or overlapping conditions.
7 . The method of claim 4 , wherein determining an optimal set of user segments further comprises:
creating a set of user segments, the set of user segments including the user segment and the second user segment;
determining a first metric for the user segment and a second metric for the second user segment, the first metric and the second metric based on user segment precision and coverage;
based on the first metric being higher than the second metric, retaining the user segment in the optimal set of user segments and removing the second user segment from the set of user segments; and
providing the set of user segments as the optimal set of user segments.
8 . The method of claim 4 , wherein the determining the optimal set of user segments further comprises:
using a genetic algorithm to select an initial population of relevant conditions and create a set of user segments;
iteratively performing operations comprising:
determining a fitness score of each user segment in the set of user segments;
based on the fitness score, combining two of the user segments from the set of user segments into a new user segment; and
combining two relevant conditions corresponding to the two of the user segments, to generate a combination of relevant conditions corresponding to the new user segment.
9 . The method of claim 1 , further comprising:
identifying, by the computing device, a set of ranges for numerical values within the training data; and
converting numerical data into categorical data by replacing a numerical value with a range.
10 . A system comprising:
a non-transitory computer-readable medium storing computer-executable program instructions for determining user segments created by a predictive model based on user behavioral data; and
a processing device communicatively coupled to the non-transitory computer-readable medium for executing the computer-executable program instructions, wherein executing the computer-executable program instructions configures the processing device to perform operations comprising:
accessing an outcome of interest and training data comprising a plurality of instances of user interaction data, each instance of the user interaction data associated with a user interaction within a computer network and comprising a plurality of attributes and an outcome associated with the user interaction, wherein the outcome of interest and the training data were previously used to train a trained predictive model;
generating a set of conditions from the training data, each condition comprising an attribute and a range of values for the attribute;
generating multiple instances of input data from the training data, wherein the multiple instances of input data are associated with the set of conditions, and wherein each instance of input data comprises at least one instance of user interaction data from the training data satisfying a corresponding condition;
determining a set of relevant conditions from the set of conditions based on relevance to the outcome of interest according to the trained predictive model, wherein determining the set of relevant conditions comprises:
selecting a first condition related to a first attribute;
causing the trained predictive model to compute, using a first instance of the multiple instances of input data corresponding to the first condition, a first predicted outcome;
determining a first relevance of the first condition by comparing the outcome of interest to the first predicted outcome;
including the first condition in the set of relevant conditions, based on the first relevance;
selecting a second condition related to a second attribute;
causing the trained predictive model to compute, using a second instance of the multiple instances of input data corresponding to the second condition, a second predicted outcome;
determining a second relevance of the second condition by comparing the outcome of interest to the second predicted outcome and
excluding the second condition from the set of relevant conditions, based on the second relevance;
generating a user segment associated with the set of relevant conditions; and
presenting the user segment to an interface.
11 . The system of claim 10 , wherein generating the set of conditions further comprises:
extracting each condition present in each instance of the user interaction data, and
aggregating each condition into the set of conditions.
12 . The system of claim 10 , wherein executing the computer-executable program instructions further configures the processing device to perform operations comprising determining a relevance of the user segment based on a predicted outcome from the trained predictive model given the set of relevant conditions associated with the user segment.
13 . The system of claim 12 , wherein executing the computer-executable program instructions further configures the processing device to perform operations comprising:
determining, based on the relevance of the user segment and a relevance of a second user segment, an optimal set of user segments, the optimal set of user segments comprising at least one of the user segment and the second user segment, wherein the optimal set of user segments are user segments that are most relevant to the outcome of interest.
14 . The system of claim 13 , wherein executing the computer-executable program instructions further configures the processing device to perform operations comprising:
determining that the second user segment is redundant compared to the user segment;
and removing the second user segment from the optimal set of user segments.
15 . The system of claim 10 , wherein executing the computer-executable program instructions further configures the processing device to perform operations comprising processing the user segment to remove redundant or overlapping conditions.
16 . A non-transitory computer-readable storage medium storing computer-executable program instructions, wherein when executed by a processing device, the computer-executable program instructions cause the processing device to perform operations comprising:
accessing an outcome of interest and training data comprising a plurality of instances of user interaction data, each instance of the user interaction data associated with a user interaction within a computer network and comprising a plurality of attributes and an outcome associated with the user interaction, wherein the outcome of interest and the training data were previously used to train a trained predictive model;
generating a set of conditions from the training data, each condition comprising an attribute and a range of values for the attribute;
generating multiple instances of input data from the training data, wherein the multiple instances of input data is associated with the set of conditions, and wherein each instance of input data comprises at least one instance of user interaction data from the training data satisfying a corresponding condition;
determining a set of relevant conditions from the set of conditions based on relevance to the outcome of interest according to the trained predictive model, wherein determining the set of relevant conditions comprises:
selecting a first condition related to a first attribute;
causing the trained predictive model to compute, using a first instance of the multiple instances of input data corresponding to the first condition, a first predicted outcome;
determining a first relevance of the first condition by comparing the outcome of interest to the first predicted outcome;
including the first condition in the set of relevant conditions, based on the first relevance;
selecting a second condition related to a second attribute;
causing the trained predictive model to compute, using a second instance of the multiple instances of input data corresponding to the second condition, a second predicted outcome;
determining a second relevance of the second condition by comparing the outcome of interest to the second predicted outcome; and
excluding the second condition from the set of relevant conditions, based on the second relevance;
generating a user segment associated with the set of relevant conditions; and
presenting the user segment to an interface.
17 . The non-transitory computer-readable storage medium of claim 16 , wherein generating the set of conditions further comprises:
extracting each condition present in each instance of the user interaction data, and
aggregating each condition into the set of conditions.
18 . The non-transitory computer-readable storage medium of claim 16 , wherein the computer-executable program instructions further cause the processing device to perform operations comprising determining a relevance of the user segment based on a predicted outcome from the trained predictive model given the set of relevant conditions associated with the user segment.
19 . The non-transitory computer-readable storage medium of claim 18 , wherein the computer-executable program instructions further cause the processing device to perform operations comprising:
determining, based on the relevance of the user segment and a relevance of a second user segment, an optimal set of user segments, the optimal set of user segments comprising at least one of the user segment and the second user segment, wherein the optimal set of user segments are user segments that are most relevant to the outcome of interest.
20 . The non-transitory computer-readable storage medium of claim 19 , wherein the computer-executable program instructions further cause the processing device to perform operations comprising:
determining that the second user segment is redundant compared to the user segment;
and removing the second user segment from the optimal set of user segments.