Feature selection method and system for regression analysis / model construction
Aspects of the subject disclosure may include, for example, dividing a feature range of a feature into a plurality of subsets that span the feature range, calculating an average target variable value for each subset of the plurality of subsets, resulting in a plurality of average target variable values, and estimating a measure of feature significance with respect to a target variable by determining a difference between a maximum average target variable value and a minimum average target variable value in the plurality of average target variable values. Other embodiments are disclosed.
1 . A method, comprising:
selecting, by a processing system including a processor, a feature from a plurality of features in a data set for generating a machine learning model, wherein:
the plurality of features are determined to potentially impact a target variable of the machine learning model, and
the data set comprises feature values of the plurality of features associated with target variable values of the target variable;
dividing, by the processing system, a feature range of the feature into a plurality of subsets that span the feature range, wherein the feature range comprises a value range of the feature values for the feature from the data set;
calculating, by the processing system, an average target variable value from the target variable values associated with the feature values for each subset of the plurality of subsets, resulting in a plurality of average target variable values;
estimating, by the processing system, a measure of feature significance with respect to the target variable by determining a difference between a maximum average target variable value and a minimum average target variable value in the plurality of average target variable values; and
generating the machine learning model using at least the feature based on the measure of feature significance indicating an impact on the target variable.
2 . The method of claim 1 , wherein the average target variable value comprises an arithmetic mean value.
3 . The method of claim 1 , wherein the average target variable value comprises a median value.
4 . The method of claim 1 , wherein the average target variable value comprises a mode value.
5 . The method of claim 1 , wherein the average target variable value comprises a mid-range value.
6 . The method of claim 1 , wherein the feature comprises a numeric feature, wherein the method further comprises determining, by the processing system, the feature range for the numeric feature based on a difference between maximum and minimum values of the numeric feature, wherein the dividing the feature range comprises splitting the feature range into a set of equal sub-intervals, and wherein the calculating the average target variable value for each subset of the plurality of subsets comprises calculating an average target variable value for each of the equal sub-intervals.
7 . The method of claim 1 , wherein the feature comprises a categorical feature, wherein the dividing the feature range comprises determining a list of unique categorical values, and wherein the calculating the average target variable value for each subset of the plurality of subsets comprises calculating an average target variable value for each of the unique categorical values.
8 . The method of claim 1 , wherein the feature comprises one or more of an integer feature or a logical feature.
9 . The method of claim 1 , wherein the machine learning model comprises a regression model.
10 . A device, comprising:
a processing system including a processor; and
a memory that stores executable instructions that, when executed by the processing system, facilitate performance of operations, the operations comprising:
determining a type of each feature of a plurality of features associated with a target variable in a data set for generating a machine learning model, wherein:
the plurality of features are determined to potentially impact a target variable of the machine learning model, and
the data set comprises feature values of the plurality of features associated with target variable values of the target variable;
for each feature of the plurality of features, estimating a respective significance value for that feature, relative to the target variable, based on the type of that feature and the feature values and the target variable values of that feature, resulting in a plurality of respective significant values;
performing filtering of the plurality of features based on the plurality of respective significant values; and
generating the machine learning model using a set of features that were filtered from the plurality of features.
11 . The device of claim 10 , wherein the machine learning model comprises a regression model or predictive model.
12 . The device of claim 10 , wherein the performing the filtering comprises sorting the plurality of respective significant values to identify the set of features from the plurality of features that each has a determined significant impact on the target variable.
13 . The device of claim 10 , wherein the performing the filtering comprises comparing the plurality of respective significant values with a threshold.
14 . The device of claim 10 , wherein the estimating the respective significance value involves calculation of arithmetic mean values.
15 . The device of claim 10 , wherein the estimating the respective significance value involves calculation of median values.
16 . The device of claim 10 , wherein the estimating the respective significance value involves calculation of mode values.
17 . The device of claim 10 , wherein the estimating the respective significance value involves calculation of mid-range values.
18 . A non-transitory machine-readable medium, comprising executable instructions that, when executed by a processing system including a processor, facilitate performance of operations, the operations comprising:
identifying a plurality of subsets for a feature in a data set, wherein the data set comprises:
a plurality of features that are determined to potentially impact a target variable of the machine learning model, and
feature values of the plurality of features associated with target variable values of the target variable;
determining an average target variable value from the target variable values associated with the feature for each subset of the plurality of subsets, resulting in a plurality of average target variable values;
calculating a difference between a maximum average target variable value and a minimum average target variable value in the plurality of average target variable values, wherein the difference corresponds to a measure of feature significance with respect to the target variable; and
based on the measure of feature significance satisfying a threshold, utilizing the feature to construct a regression or predictive model.
19 . The non-transitory machine-readable medium of claim 18 , wherein the average target variable value comprises an arithmetic mean value, a median value, a mode value, or a mid-range value.
20 . The non-transitory machine-readable medium of claim 18 , wherein the feature comprises a numeric feature, a categorical feature, an integer feature, or a logical feature.