5
$\begingroup$

I have created 3 different models and output of them is a class probability in binary classification problem. Models are bit different, showing importance from different features. I have of course one data matrix as a source for this exercise where 70% of data is used as training sample.

How one can summarize importance of different feature values to the final class prob estimate if only data matrix and list of features used is know besides this class probability estimate?

Individual models can be of course explained by different methods, but how one can explain avg ensemble predictions?

EDIT:

I have an data matrix containing all features and their values from different models plus of course combined ensemble probability estimate. How can one summarize how globally different features affect ensemble prob?

EDIT 2:

Can feature importances from different models combined somehow if different models use different features and variable value codings might be different?

$\endgroup$
  • $\begingroup$ So the outputs of each model are going into a metamodel? $\endgroup$ – Acccumulation Jun 13 '18 at 22:30
  • $\begingroup$ @Accumulation yes, it is so. Suppose I have a data matrix containing all features from different score and one combined ensemble probability estimate. $\endgroup$ – Analyst Jun 14 '18 at 19:42
  • $\begingroup$ Do you have importances for each features going into each submodel, and importance of each submodel going into the metamodel? $\endgroup$ – Acccumulation Jun 14 '18 at 20:01
  • $\begingroup$ I have algorithms of course, but no consistent metric of individual feature importance since some models do use some features at all. $\endgroup$ – Analyst Jun 15 '18 at 18:06
2
+50
$\begingroup$

Here are three intuitive ways to solve the problem:

  • First normalize the feature importance of the features for each model to belong to 0-1 and then average the normalized feature importance values across the three models.
  • Do the same as above, but instead of averaging perform weighted averaging of the feature importance. The weights in this case can be the performance of the models on your hold-out set. That way, you put more weight on your better performing models.
  • In case you are interested in just ranking the features and you are not interested in their relative importance you can rank the features for each model and then average (or even weight-average) the corresponding ranks. For instance, the most important features has rank 1, the second most important feature rank 2 etc.. You do this across the three models and then you average the ranks. Of course, lower values suggest higher feature importance.
$\endgroup$
  • $\begingroup$ Thanks for the suggestion. But can one summarize feature importances from different models? Suppose one is classical glm and others are such that they might have one hot encoding for categorical feature values. $\endgroup$ – Analyst Jun 14 '18 at 19:46
  • $\begingroup$ In the ways I describe you can summarize the importance of the features of models with same inputs. Assume a feature representation and use it for each model, e.g., Logistic Regression, Boosted trees, Random Forest etc. You can only compare similar things, otherwise you have the bias of the representation. $\endgroup$ – geompalik Jun 15 '18 at 13:13
2
$\begingroup$

A straightforward way is to remove each feature and see how the ensemble model performs without it.

$\endgroup$
  • $\begingroup$ Replace with "neural" value or such? If I remove feature before creating ensemble probs this would most likely fail due to missing feature. $\endgroup$ – Analyst Jun 14 '18 at 20:04
  • $\begingroup$ Why would missing feature cause the model to fail? I assume you meant "neutral"? $\endgroup$ – LiCh Jun 14 '18 at 21:44
  • $\begingroup$ Suppose that for example R's prediction methods model object needs feature to be present when model is used to generate probability to ensemble model. $\endgroup$ – Analyst Jun 15 '18 at 18:08
  • 1
    $\begingroup$ Sorry, I don't understand the problem. Are you saying that removing a single feature out of your feature set will cause your model to fail? $\endgroup$ – LiCh Jun 15 '18 at 21:50
0
$\begingroup$

How to describe most important features of ensemble model as list?

To make best use of a probability forecasts, users must choose a probability threshold which gives the correct balance of alerts and false alarms for their particular application. You can assign fixed values or calculate posterior probability.

You can use a range of values or percentages on the input data, mid-point calculations and/or the end result. If you find an outlier you might alter your output to specify the percentage of outliers included or removed. If the data has a narrow or flat confidence you might want to include that disclaimer in the output, omitting it otherwise.

Your output can be presented using a pyramid chart, Funnel Chart, or PowerPoint, other graphic/text based, or sophisticated 'Mind Map' style output. That should flexibly cover every situation from simple to complex. Calculations made with respect to the confidence, alerts, outliers, etc. can be used to choose one preferred chart style over another while you debug.

Your program ought to be formulated so it is always able to provide output that is suitable as a final result even in 'debug mode', (over what you originally had in mind). You don't want 'debug output' to provide an important result but have it be presentable to no one but yourself. The ability to save settings of Rules and have presets would make your program simple and flexible, and enable reproducible tests. Much as you would keep a copy of the input and output, keep a copy of the settings so they can be reloaded.

You want your program to work year after year, regardless of the input, providing useful output without having to tweak for each dataset if you want consistent results. You probably don't want it to appear as though the work was done by a different person every time.

Once you are finished the tool should 'just work', consistently. Here are examples of pyramid charts that can be automatically modified by the above techniques and the source code links provided below.

Example Pyramid Chart 1

Example Pyramid Chart 2

Examples for creating a Pyramid Chart in Python:

Also consider JavaScript output to create a web-based dynamic chart.

EDraw - Free Mind Map Software

$\endgroup$
  • $\begingroup$ Why was my comment deleted? $\endgroup$ – Acccumulation Jun 14 '18 at 19:53
  • 1
    $\begingroup$ How would you use such a pyramid to "summarize importance of different feature values to the final class prob estimate if only data matrix and list of features used is know besides this class probability estimate", for example? It isn't clear to me how this suggestion is related to the OP's question. $\endgroup$ – gung Jun 14 '18 at 22:48
  • $\begingroup$ @Acccumulation, I don't see a deleted comment from you on this page. $\endgroup$ – gung Jun 14 '18 at 22:50
  • $\begingroup$ (I am the downvoter.) Are you saying that your answer amounts to: 'Once you've figured out how to "summarize importance of different feature values to the final class prob estimate if only data matrix and list of features used is know besides this class probability estimate", you can present that summary via a pyramid plot'? $\endgroup$ – gung Jun 15 '18 at 1:36
  • $\begingroup$ (-1) This answer doesn't saw anything about how to map information about the features to the charts, and also the specific charts presented are not effective at communicating their contents. The second one seems to be a pie chart shaped like a pyramid, is the ordering supposed to convey something? $\endgroup$ – Jonny Lomond Jun 15 '18 at 18:38

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.