1
$\begingroup$

How should one identify the most contributory independent variable of a dependent variable? Many use cases are associated with this.

There are many ways to quantify relationships, for example,

  1. Pearson, and Spearman correlation.
  2. ANOVA analysis
  3. Machine learning approach (bootstrapping) and find most influencing features, e.g., using Random Forest.
  4. A/B test

Among all those (some may not be necessarily listed above), what will be the best way for finding correlation/influencing factors?

Understood the question itself may be very broad. Here I'm not asking about the details of data processing, but the idea of approaching the question fundamentally. If it would be good, you can also help distinguish the correlation from the followings:

  1. the most important features
  2. the best machine learning models
$\endgroup$
14
  • $\begingroup$ Short answer: It varies from one data set to the next. $\endgroup$
    – Carl
    Commented Jan 2, 2018 at 2:10
  • $\begingroup$ @Carl, understood. can you help to explain more? for example, feature and dependent variable are categorical/numeric respectively. $\endgroup$ Commented Jan 2, 2018 at 9:17
  • 1
    $\begingroup$ @Carl, putting the question on hold (& possibly eventually closing) does not mean the Q won't be 'kept'. I upvoted your answer, so I understand your point, nonetheless, this Q really is too broad. $\endgroup$ Commented Jan 2, 2018 at 22:12
  • 1
    $\begingroup$ This remains vastly too broad. At least one book is required to answer all of this well, & possibly more than one. $\endgroup$ Commented Jan 4, 2018 at 14:15
  • 1
    $\begingroup$ This has been asked (in various forms) many times on CV, you will just need to do some work searching and reading a variety of threads. The question, 'can you help distinguish the correlation from SVM' (or 'can you help distinguish the correlation from a neural network', etc) could be a viable Q here, but "help distinguish the correlation from... the best machine learning models", eg, (even leaving aside all the rest), is considerably too broad. This question should remain closed. $\endgroup$ Commented Jan 5, 2018 at 13:38

3 Answers 3

3
$\begingroup$

Answer is book length. Topic is too broad. For example, some of the items listed feature tests that are not comparable to others on the list, and in some the similarities are narrow between broad topics. It would be easier to ask "How do I process data," which although also very broad as a question, has the advantage of being more organized. Sic...

Step one for examining data; Cartesian plot it.

Step two; find a general organizing principle for the data, that simplifies it, e.g., but not limited to, linearizing the data or finding homoscedasticity. This includes, but is not limited to, data transforms like log-log plotting, semi-log plotting, linear-log plotting, polar coordinate plotting, reciprocation, squaring or square-rooting.

Step three; fit models to the transformed data using the the criteria of interest for modelling. Sometimes the criteria of interest involve goodness of fit, sometimes goodness of fit is irrelevant. For example, if we wish to stabilize scaled data with respect to fitting a semi-infinite support distribution like a scaled gamma distribution, we may wish to use ridge regression by optimizing parameters that cause the total area to have a least relative error. That would have little in common with goodness of fit and would not be directly related to an AIC (Akaike information criterion), which in turn would limit the considerations to maximum likelihood fitting, i.e., goodness of fit. Another example, we may wish to have a best predictive model, e.g., one that least error predicts out of range withheld data. That would also be different from a goodness of fit criterion within the training set.

Step four; compare multiple models under the criteria of interest for usefulness.

Why this lecture? When we execute step three above, we must apply our purpose or reason for modelling. That purpose will imply criteria for model selection and allow us to the select a battery of tests that comparatively or absolutely characterize the performance of a model or models.

If you want a more specific answer, you must select a purpose for your intended modelling. How the listed criteria fit into the steps above depends on when they are applied. For example, following step one above, if we find that $r^2<<r_s^2$ (Pearson-squared much less than Spearman-rank squared), we may want to linearize the data by data transformation, and if we find that $r^2>>r_s^2$, the data may have undesirable outlier properties, or generally a relatively sparse middle x-axis population resulting in false augmentation of the apparent correlation. After data transformation, even if the data appears to be linear in Cartesian coordinates, the $r^2$ value of the transformed data may increase. This could occur, for example, when the data is proportional error type and we take the logarithm of the y-axis values. However, correlation is hardly the only criterion one would apply to make a decision regarding the data. Ideally, correlation goes to precision, but not accuracy, of modelling. A/B testing and ANOVA are similar and are subject to the same general considerations as correlations. For example, adjusted R$^2$, partial ANOVA probabilities, AIC, AIC$_c$ and BIC, principal component analysis, weighted least squares, and others are directed towards model selection, and which is(are) useful depends on the goal, target, reason, motive, designated usage or what have you in step four above.

$\endgroup$
2
$\begingroup$

Very very broad topic. Pearson Correlation only gives you linear association. Spearman and Kendall correlations would give rank associations (monotonic relationships). However, you do not want to limit yourself to correlation alone. Read "An Introduction to Variable and Feature Selection" before you read anything else.

I would not distinguish techniques as machine learning / non-machine learning. They are all statistical inference techniques. If the end goal is to classify it certainly makes sense to check the discriminatory information captured by each feature individually (one way is decision trees that use the Gini index or entropy, another is regularisation penalties like L1 or L2 regression). But then again, some features may be uninformative on their own, whereas quite informative when combined with others. Hence, I will finish how I started:

Read "An Introduction to Variable and Feature Selection". It is a very good paper, and will definitely give you more context than any answer can in this limited space.

Once you have finished the paper, I would start investigating multicollinearity, variance inflation factor, etc.

$\endgroup$
1
$\begingroup$

Pearson Coefficient

  • This is not a good way to know if the factor is really influencing the response variable.

  • As an extreme example, the following patters all have correlation of -0.06, but do not explain the influencing factor.

ANOVA - F-test or T-test

  • The anova model is only valid for LINEAR regression as SSE + SSR = SST, but its not equal for non linear regression.

  • Also we do not have P-values for non linear regression.WHY?

  • Correct null hypothesis value for each parameter depends on the expectation function, the parameter's place in it, and the field of study. Because the expectation functions can be so wildly different, it’s impossible to create a single hypothesis test that works for all nonlinear models.

  • But confidence interval for each parameter estimate. Use your knowledge of the subject area and expectation function to determine if this range is reasonable and if it indicates a significant effect.

Least Square + L2 Norm (a.k.a LASSO or Ridge Regression)

  • It is very widely used constraint with the least square
  • The L2 Norm makes the parameter estimate of less relevant predictors close to zero.
  • Can be used in linear and non linear way.

Random Forest (RF)

  • For Categorical predictors, the gini index of random forest are a good way to select categorical features.
  • RF can also model non linear boundaries.
$\endgroup$
4
  • $\begingroup$ for the example given under Pearson, are you trying to demonstrate that Pearson can't capture the non-linear influencing factors? $\endgroup$ Commented Jan 2, 2018 at 9:15
  • $\begingroup$ Yes, it can capture non linear influencing factor, but it's necessary to visualize the data (via scatter plot or any other technique). So first you have to decide what kind of predictors (categorical or continuous). Then consider linear models, if they are not good enough, then try non linear models. Gradually increase your complexity of the model from Linear to Non-Linear, bcoz this is what is told by Occam's razor (simpler model is better than complex model) $\endgroup$ Commented Jan 2, 2018 at 9:58
  • $\begingroup$ Also how was that plot made? $\endgroup$ Commented Jan 2, 2018 at 21:34
  • $\begingroup$ The plot was taken from my graduate study text. I cannot provide a reference to it, so I have removed the plot. I have no idea how the plot was made! $\endgroup$ Commented Jan 4, 2018 at 14:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.