# Generating Predictive Models

We use the random forest machine learning technique to generate our predictive models. Visier’s learning algorithm examines historical employee data and employee events like promotions, resignations, and internal hires to learn a set of patterns and construct decision trees that help you predict the occurrence of an event. For example, the decision tree, in the following illustration, predicts whether an employee will resign in the next 12 months based on their attributes.

To construct a decision tree, the learning algorithm analyzes the employee data to determine the attribute that best separates the data into two distinct groups. For the previous example, the two distinct groups are the employees who resigned and the employees who stayed. This process is repeated at each node and the tree grows until the stopping criteria is met. The event likelihood is based on the proportion of employees in each group at the leaf node (the end of each path). The following illustration shows how the decision tree is constructed and the risk of resignation is determined (ratio of employees who resigned).

The random forest machine learning technique is based on the idea that an ensemble of decision trees is more accurate than any individual decision tree. Visier’s learning algorithm constructs many different decision trees by analyzing a random subset of information about the employee at each split to determine the attribute that best separates the data into two distinct groups. This means that each tree is constructed using a different combination of attributes, as shown in the following illustration.