# Correlation between string and numeric variables

**URL:** <https://forum.knime.com/t/correlation-between-string-and-numeric-variables/48898>\
**Category:** KNIME Analytics Platform\
**Created:** [November 13, 2022, 11:42am UTC](https://forum.knime.com/t/correlation-between-string-and-numeric-variables/48898 "2022-11-13T11:42:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![filipa\_marques](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/f/cdc98d/32.png) [@filipa\_marques](https://forum.knime.com/u/filipa_marques)\
**Post date:** [November 13, 2022, 11:42am UTC](https://forum.knime.com/t/correlation-between-string-and-numeric-variables/48898/1 "2022-11-13T11:42:55Z")

</div>

Hi,

Is it possible to calculate a correlation between string and numeric variables in Knime?  
I tried the Linear Correlation node, but it only calculates string - string and numeric - numeric correlations; string - numeric variable pair correlations come out as “?” in the correlation matrix.

Thanks!

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [November 13, 2022, 1:33pm UTC](https://forum.knime.com/t/correlation-between-string-and-numeric-variables/48898/2 "2022-11-13T13:33:39Z")

</div>

Hi Filipa & welcome to the KNIME community forum

Is there any known correlation metric in particular berween strings and numbers you have in mind ?

Maybe you have already used such kind of metric in another data mining tool but it is not available in Knime ?

If so, could you please provide its name to better understand what exactly you need to achieve ?

Thanks in advance.  
Best  
Ael

---

<div class="post-metadata">

**Author:** ![filipa\_marques](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/f/cdc98d/32.png) [@filipa\_marques](https://forum.knime.com/u/filipa_marques)\
**Post date:** [November 13, 2022, 3:02pm UTC](https://forum.knime.com/t/correlation-between-string-and-numeric-variables/48898/3 "2022-11-13T15:02:57Z")

</div>

Hello,

I did non use such a metric before.  
I want to predict if a hotel booking reservation is canceled (dummy variable). My data set has a high number of predictors (categorical and numeric), so it would be very useful to get some sort of association measure between my target and the features before testing an algorithm

---

<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:** [November 13, 2022, 3:56pm UTC](https://forum.knime.com/t/correlation-between-string-and-numeric-variables/48898/4 "2022-11-13T15:56:19Z")

</div>

Hi @filipa_marques

see:

> [@Feature Importance using decision tree](https://forum.knime.com/t/feature-importance-using-decision-tree/27711/3):
>
> Hi @sschacht Maybe the [Information Gain Calculator](https://nodepit.com/node/ws.palladian.nodes.classification.featureselection.InformationGainCalculatorNodeFactory) helps you to give some insights about the feature importance. gr. Hans

gr. Hans

---

<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 11, 2023, 3:56pm UTC](https://forum.knime.com/t/correlation-between-string-and-numeric-variables/48898/5 "2023-02-11T15:56:57Z")

</div>

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