1
$\begingroup$

I have a dataset having 7 attributes viz., time, C1, ... C7 pertaining to earth quake reports where each column/attribute represents a certain aspect of damage viz., power, sewer_and_water, shake_intensity, etc. Each of these attributes have a rating from 0 to 10, where 0 represents no damage and 10 represents maximum damage.

Since, some of the ratings in each attribute might not be trustworthy, hence I am trying to compute a weighted score as follows- (C1 * W1) + (C2 * W2) + ... + (C7 * W7); where Ci is ith attribute and Wi is the feature importance score for it.

In order to compute a weighted score of each row/data point, I am trying to train a classifier such as Random Forest, LightGBM or XGBoost which will give me a feature importance score for each attribute. However, since I don't know which attribute is supposed to be target, I used a brute force approach where I chose each attribute as target and trained a classifier to see which gave me the highest accuracy.

However, this approach has the problem that out of n attributes, I will only get feature importance score for (n - 1) attributes as the nth attribute is the target variable.

Can you suggest a way in which I can get the feature importance scores for each attribute in dataset.

Thanks!

$\endgroup$
1
$\begingroup$

Not all the algorithms provide you feature_importance, some of them give you coeff(weights W1..W7) values. So according to me, the way you are extracting feature_importance is correct.

However, this approach has the problem that out of n attributes, I will only get feature importance score for (n - 1) attributes as the nth attribute is the target variable.

Model gets trained based upon the features and target value. So you will get the feature_importance only for features and not for the target.

Using statistical approach you can also analyse the relationship between the various features and the target value.

As a side note:

  • Make sure you normalized the whole features on the same scale for better and faster training.
$\endgroup$
  • $\begingroup$ can you suggest some statistical approach(es) besides correlation matrix or heatmap which I have used which I can look into? $\endgroup$ – Arun May 24 '19 at 5:26
  • $\begingroup$ Not much familiar, but still sharing a link stats.stackexchange.com/questions/60856/…, check if it's helpful. $\endgroup$ – vipin bansal May 25 '19 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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