Categorical Feature Conversion for Decision Tree Overfitting
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing machine learning algorithms face challenges in effectively processing categorical features, particularly in converting them into numeric representations that prevent overfitting and improve prediction accuracy in decision trees.
Innovation Solution
The method involves organizing training objects with categorical features into an ordered list, calculating the number of appearances of a categorical feature relative to its predecessors, and using formulas to generate numeric representations based on past occurrences and outcomes, ensuring that only past data is considered to avoid looking ahead and reduce overfitting.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional machine learning algorithms process categorical features directly, then the device complexity is reduced, but the prediction accuracy deteriorates due to inability to effectively convert categorical features into numeric representations
Solution Approach 1:
The patent transforms categorical feature values into numeric representations by changing the parameter type from categorical to numerical. This is achieved through a conversion mechanism that assigns numeric values based on the frequency and outcome patterns of categorical features in the training data, enabling effective processing by machine learning algorithms while maintaining prediction accuracy
Solution Approach 2:
The patent introduces an intermediary conversion layer between the categorical features and the machine learning model. This intermediary component calculates frequency ratios and outcome probabilities for each categorical feature value, serving as a bridge that translates categorical data into meaningful numeric representations without requiring complex model architecture changes
2Measurement precision
If all available training data is used for feature conversion, then the prediction accuracy improves, but the risk of overfitting increases
Solution Approach 1:
The patent applies partial action by using only the necessary statistical measures (frequency and outcome counts) from the training data for feature conversion, rather than utilizing all possible data attributes. This selective approach captures the essential patterns needed for accurate prediction while avoiding the inclusion of excessive information that could lead to overfitting
Solution Approach 2:
The patent performs preliminary aggregation of categorical feature statistics during the training phase, calculating frequency ratios and outcome probabilities in advance. This preliminary action condenses the training data into essential numeric representations that can be applied during prediction without requiring access to the full training dataset, thereby reducing overfitting risk
3Measurement precision
If categorical features are converted using complex conversion methods, then the prediction accuracy improves, but the processing time increases
Solution Approach 1:
The patent performs all complex conversion calculations during the training phase, pre-computing frequency ratios and outcome probabilities for each categorical feature value. These pre-computed numeric representations are stored and directly applied during prediction, eliminating the need for time-consuming conversions during inference and significantly reducing processing time
Solution Approach 2:
The patent segments the feature conversion process into distinct phases: training-phase computation of frequency and outcome statistics, and inference-phase application of pre-computed values. This segmentation allows complex calculations to be performed only when necessary (during training), while prediction operations use simple lookup and application of pre-computed numeric representations, reducing overall processing time
Data Source
AI summary
There is disclosed a method of and a system for converting a categorical feature value into a numeric representation thereof, the categorical feature being associated with a training object used for training a Machine Learning Algorithm (MLA). The MLA is trained using several models, each model comprising a plurality of decision trees (an ensemble of decision trees). For each model, a respective set of training objects into an ordered list of training objects such that for each given training object there is at least one of: (i) a preceding training object that occurs before the given training object and (ii) a subsequent training object that occurs after the given training object. The method further comprises, for a given categorical feature, using a respective ordered set to generate numeric representation of values of the given categorical feature.


