# Calculate feature importance in a multi-class classification by KNIME?

**URL:** <https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266>\
**Category:** KNIME Analytics Platform\
**Created:** [January 27, 2026, 6:46am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266 "2026-01-27T06:46:04Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![qianyi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/q/53a042/32.png) [@qianyi](https://forum.knime.com/u/qianyi)\
**Post date:** [January 27, 2026, 6:46am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/1 "2026-01-27T06:46:04Z")

</div>

Hi there!

I need to calculate feature importance for a multi-class classification task.  
I tried to explore previous component, and found the Global Feature Importance – KNIME Community Hub, which is useful but only for a binary classification.

Are there any component or other ways to get feature importance for a multi-class classification?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![HansS](https://forum-cdn.knime.com/user_avatar/forum.knime.com/hanss/32/6979_2.png) [@HansS](https://forum.knime.com/u/HansS)\
**Post date:** [January 27, 2026, 8:13am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/2 "2026-01-27T08:13:36Z")

</div>

Hi @qianyi

Next to the Global Feature Importance, there are two more options mentioned in this thread.

> [@node for feature importance](https://forum.knime.com/t/node-for-feature-importance/88783):
>
> Does KNIME has a node to find feature importance in Random Forest?

gr, Hans

---

<div class="post-metadata">

**Author:** ![qianyi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/q/53a042/32.png) [@qianyi](https://forum.knime.com/u/qianyi)\
**Post date:** [January 27, 2026, 8:30am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/3 "2026-01-27T08:30:49Z")

</div>

Hi @HansS

Thanks for your reply. I have found the 1st. option already, it seems still a binary classification.

Will try to use the 2nd. one (need to install NodePit beforehand).

Thanks!

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [January 27, 2026, 8:38am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/4 "2026-01-27T08:38:46Z")

</div>

@qianyi a lot of these model types do offer feature importance:

> **[Score UCI Wine Quality Dataset - multiple Targets (multiclass) with H2O.ai...](https://hub.knime.com/mlauber71/spaces/Machine_Learning/ml_multiclass/kn_example_ml_multiclass_wine_quality~30cUHeMqktUsRUZo/current-state)**
>
> Score UCI Wine Quality Dataset - multiple Targets (multiclass) with H2O.ai nodes and other models - measure results with LogLoss

---

<div class="post-metadata">

**Author:** ![gonhaddock](https://forum-cdn.knime.com/user_avatar/forum.knime.com/gonhaddock/32/35425_2.png) [@gonhaddock](https://forum.knime.com/u/gonhaddock)\
**Post date:** [January 27, 2026, 8:47am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/5 "2026-01-27T08:47:49Z")

</div>

Hello @qianyi  
I tested once in the old way approaching by looping a ‘Linear Regression Learner’. I’m not sure this method will fit your use case.

> **[Just KNIME It S02 \_ CH09 \_ Wine Quality – gonhaddock](https://hub.knime.com/gonhaddock/spaces/Just_KNIME_It/Just%20KNIME%20It%20S02%20_%20CH09%20_%20Wine%20Quality~20QryRsPnVqgw194/current-state)**
>
> In this challenge, your goal is to see which features are the most important in predicting the quality of wine. After doing this analysis, you should create a …

BR

---

<div class="post-metadata">

**Author:** ![rfeigel](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/r/7ea924/32.png) [@rfeigel](https://forum.knime.com/u/rfeigel)\
**Post date:** [January 29, 2026, 12:33am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/7 "2026-01-29T00:33:41Z")

</div>

Try this. Has Global & Local Feature Importance for a three class data set (Iris Data.) You can change the model(s) as you see fit.

> **[Multi Class Global & Local Feature Importance – rfeigel](https://hub.knime.com/rfeigel/spaces/Public/Multi%20Class%20Global%20&%20Local%20Feature%20Importance~Q9PwJAluBJwY7sQH/current-state)**
>
> Compute and Visualize Global Feature Importance Metrics This application is a simple example of inspecting global feature importance for binary and multiclass …

 ![workflow](https://forum-cdn.knime.com/uploads/default/original/3X/2/d/2ddbd750ed74d144b51fef46ece7c51d003b46d7.jpeg)

---

<div class="post-metadata">

**Author:** ![qianyi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/q/53a042/32.png) [@qianyi](https://forum.knime.com/u/qianyi)\
**Post date:** [January 30, 2026, 4:46am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/8 "2026-01-30T04:46:22Z")

</div>

Thanks for the reply!

@mlauber71 I’m interested in getting an environment propagation error when running this workflow.  
Do I need to create a conda environment with the name “kaggle”?  
I think my existing conda environment can run h2o, xgboost.

@gonhaddock I found this workflow interesting. I’ll try to apply it to classification instead of regression.

@rfeigel the local explanation viewer nearly perfectly fits my needs. Thanks!

---

<div class="post-metadata">

**Author:** ![qianyi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/q/53a042/32.png) [@qianyi](https://forum.knime.com/u/qianyi)\
**Post date:** [January 30, 2026, 6:35am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/9 "2026-01-30T06:35:02Z")

</div>

@rfeigel

probably it’s better to start another topic, but if you know, is the AutoML component in this workflow support model writer / reader?

I tried the model writer, it works fine.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/5/7/577937e0005d439299357d2fcfb784d21ca353bf.png)

but when I tried to read the model in another workflow to execute the AutoML model, it failed.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/d/2/d2a3bb92e5ae136f22830d5e0429942932ba63bf.png)

And comment and idea are welcome!

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [January 30, 2026, 6:38am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/10 "2026-01-30T06:38:05Z")

</div>

@qianyi you need the:

> **[Workflow Writer](https://hub.knime.com/knime/extensions/org.knime.features.buildworkflows/latest/org.knime.buildworkflows.writer.WorkflowWriter2NodeFactory)**
>
> This node writes a workflow from a port object into a folder or an exported KNIME workflow (.knwf) archive. This node can access a variety of different file sy…

---

<div class="post-metadata">

**Author:** ![qianyi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/q/53a042/32.png) [@qianyi](https://forum.knime.com/u/qianyi)\
**Post date:** [January 30, 2026, 8:25am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/11 "2026-01-30T08:25:13Z")

</div>

@mlauber71

thanks for your quick response!

Actually, I tried this before using Model reader / writer,  
but something went wrong, currently I can’t figure out.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/4/f43ac8e2327468647ff3e2ad5e87767b1a78999c.png)

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [January 30, 2026, 9:48am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/12 "2026-01-30T09:48:08Z")

</div>

@qianyi I forgot to mention the special handling of the ports. Maybe try it like this:

> [@Auto-ML. Output port has no data to display.](https://forum.knime.com/t/auto-ml-output-port-has-no-data-to-display/83943/4):
>
> One remark about AutoML. It seems that when you want to store the resulting workflow and load it again you will have to remove the input and output that has been stored with the workflow so as to allow the use of the new data. Also then with the Workflow Executor you will have to adjust the input and output sessions once. Now the Executor is ready to receive the new data (which obviously has to have the same structure as the training data). And will give the results:

> [@Execute Workflow with Python - Inspect Output](https://forum.knime.com/t/execute-workflow-with-python-inspect-output/85243/4):
>
> @Brock_Tibert you would need a [Container Output (Table) – KNIME Community Hub](https://hub.knime.com/n/sma6KF7pwZETNOdi) in the knime workflow to use the syntax output\_table = wf.data\_table\_outputs[0] # output\_table will be a pd.DataFrame Otherwise the python module would not know what data to use. Another approach could be to try and call the workflow from another one and [apply the input and output port](https://forum.knime.com/t/call-workflow-table-based-additional-table-input-ports-possible/83894/2) and then see if everything would work. So you might have to tell your students to use these container outputs. Workflows ca…

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [February 6, 2026, 9:48am UTC](https://forum.knime.com/t/calculate-feature-importance-in-a-multi-class-classification-by-knime/91266/13 "2026-02-06T09:48:50Z")

</div>

Closed on February 6, 2026, 9:48am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
