# Denormalizing after MLP

**URL:** <https://forum.knime.com/t/denormalizing-after-mlp/30755>\
**Category:** KNIME Analytics Platform\
**Created:** [February 18, 2021, 11:48pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755 "2021-02-18T23:48:27Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![SirMike](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c4cdca/32.png) [@SirMike](https://forum.knime.com/u/SirMike)\
**Post date:** [February 18, 2021, 11:48pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/1 "2021-02-18T23:48:28Z")

</div>

Hi,  
I have normalized my dataset to train my MLP. After using the PREDICTOR node, a new column is appended to the dataset with the predicted values. But the “Denormalizer” node does only denormalize all other columns but not the one with my predections. But that’s exactly what I need because I want to compare the values of the new column with one column which is already included in the dataset. I’m really lost with that, can someone help me out?  
Best

---

<div class="post-metadata">

**Author:** ![Daniel\_Weikert](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/d/e47c2d/32.png) [@Daniel\_Weikert](https://forum.knime.com/u/Daniel_Weikert)\
**Post date:** [February 19, 2021, 3:29pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/2 "2021-02-19T15:29:40Z")

</div>

Hi  
I would not normalize my target variable. Only the features  
bR

---

<div class="post-metadata">

**Author:** ![SirMike](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c4cdca/32.png) [@SirMike](https://forum.knime.com/u/SirMike)\
**Post date:** [February 19, 2021, 11:33pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/3 "2021-02-19T23:33:16Z")

</div>

Hi  
Unfortunately, that‘s not an option. The RProp MLP Learner is requesting all columns in range [0,1] and is therefore not running. I‘m quite frustrated as the neural network is working smoothly but I really need to get the predection denormalized, otherwise it‘s useless. I tried two denormalizer in a row but can‘t get it right.  
Other ideas?  
Best

---

<div class="post-metadata">

**Author:** ![Daniel\_Weikert](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/d/e47c2d/32.png) [@Daniel\_Weikert](https://forum.knime.com/u/Daniel_Weikert)\
**Post date:** [February 21, 2021, 10:48am UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/4 "2021-02-21T10:48:07Z")

</div>

Is it possible to have 2 separate normalizers in this case? If not you could also scale your target class using nodes like Math Formula or Columnexpressions yourself

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [February 22, 2021, 2:02pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/5 "2021-02-22T14:02:11Z")

</div>

Hello @SirMike,

and welcome to KNIME Community!

Prediction column needs to have same name as in Normalizer node. Check here:

> [@Problems with PMML denormalizer](https://forum.knime.com/t/problems-with-pmml-denormalizer/9458):
>
> Hi all, I'm new to Knime and I'm having some trouble to get denormalized values of both Regression Predictor and MultiLayerPerceptron Predictor. First&nbsp; I put the whole dataset through the normalizer node, then I partitioned it into training and validation sets. After obtaining&nbsp; the linear and NN models, I send them to Regression Predictor and MultiLayerPerceptron Predictor, along with the validation data set. Both predictor results are sent to denormalizer nodes. The problem is that when I l…

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![SirMike](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c4cdca/32.png) [@SirMike](https://forum.knime.com/u/SirMike)\
**Post date:** [February 24, 2021, 7:10pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/6 "2021-02-24T19:10:42Z")

</div>

I’ve Seen this Post before. When I do so, there‘s an error message from MultiLayerPerceptron Predictor: Configure failed: duplicate column names at position 5 and 12…

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [February 26, 2021, 10:33pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/7 "2021-02-26T22:33:40Z")

</div>

Hello @SirMike,

if I got it right after predictor node you have to split prediction column from all other columns (using [Column Splitter](https://kni.me/n/laI6npAqSiKLMn5S) node for example or even better [Reference Column Splitter](https://kni.me/n/jBqr78UOHDsE2AoZ) node where reference table is one from partitioning node). Then apply denormalizer on both output ports. As said columns names need to match so rename prediction column ([Column Rename](https://kni.me/n/PHWv6FsABEjrSc76)) to target column name between splitting and denormalizing. Give it a try and if you need workflow example drop me a message and can create one.

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![EllieArrows](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/bc79bd/32.png) [@EllieArrows](https://forum.knime.com/u/EllieArrows)\
**Post date:** [February 28, 2021, 3:04pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/8 "2021-02-28T15:04:14Z")

</div>

Yes. I just had to do this. It’s pretty tedious and requires 5 extra nodes in order to be able to get back to a target column and a prediction column in order to use the scoring node downstream. I wonder if there’s a way to somehow manipulate the model output from the normalizer node to include the prediction column?

![Screenshot 2021-02-28 100142](https://forum-cdn.knime.com/uploads/default/original/3X/a/6/a6b463528bd6f75efbf44ebfd51d18ed595ab5b7.png)

---

<div class="post-metadata">

**Author:** ![SirMike](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c4cdca/32.png) [@SirMike](https://forum.knime.com/u/SirMike)\
**Post date:** [February 28, 2021, 7:46pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/9 "2021-02-28T19:46:05Z")

</div>

Hi Ellie  
I think, I’m too stupid really. Now, the predicted column from the predictor does not get together anymore with the data from the test set in the reference Column Filter. Could you have a look at the screenshot and tell me, where I get things wrong?  
M  
 ![MLP Perceptron](https://forum-cdn.knime.com/uploads/default/original/3X/7/9/794cb5f70fa067e10efd4252230d9140c8aace71.png)

---

<div class="post-metadata">

**Author:** ![EllieArrows](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/bc79bd/32.png) [@EllieArrows](https://forum.knime.com/u/EllieArrows)\
**Post date:** [February 28, 2021, 9:17pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/10 "2021-02-28T21:17:00Z")

</div>

Believe me, I get your frustration. In looking back, I was wrong when I said i had to add 5 extra nodes. It was actually 6! I also had to add a denormalizer node after the predictor to first denormalize the target column, then my 5 nodes to filter down the columns to just the prediction column, change its name to the target column, apply the denormalization, change its name back to the prediction column and then join back to all of the other columns in my table. Whew!

Here’s a broader view of my flow with both denormalization nodes:

 ![Screenshot 2021-02-28 161429](https://forum-cdn.knime.com/uploads/default/original/3X/a/3/a3321311ff628638ab61a93a90a86e8257b79bb3.png)

---

<div class="post-metadata">

**Author:** ![EllieArrows](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/bc79bd/32.png) [@EllieArrows](https://forum.knime.com/u/EllieArrows)\
**Post date:** [February 28, 2021, 9:23pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/11 "2021-02-28T21:23:11Z")

</div>

Not sure if you’ll be able to make sense of my chicken scratch, but this is what I think you need to do.

![image](https://forum-cdn.knime.com/uploads/default/original/3X/0/e/0e578cccf4f3a3d9803b8d969e1c51f3ea804c92.png)

---

<div class="post-metadata">

**Author:** ![ipazin](https://forum-cdn.knime.com/user_avatar/forum.knime.com/ipazin/32/806_2.png) [@ipazin](https://forum.knime.com/u/ipazin)\
**Post date:** [March 9, 2021, 9:58am UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/12 "2021-03-09T09:58:25Z")

</div>

Hello @SirMike,

in case you still haven’t managed to denormalize your predictions here is workflow example on KNIME Hub that should help:

> **[Denormalizing Predictions after MLP – ipazin](https://hub.knime.com/ipazin/spaces/Public/latest/2021_03_09_Denormalizing_Predictions_after_MLP)**
>
> This workflow demonstrates how to denormalize predictions after MLP is trained. Multi Layer Perceptron learner node requires that target column when numeric is…

Br,  
Ivan

---

<div class="post-metadata">

**Author:** ![SirMike](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c4cdca/32.png) [@SirMike](https://forum.knime.com/u/SirMike)\
**Post date:** [March 9, 2021, 8:52pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/13 "2021-03-09T20:52:07Z")

</div>

Thank you so much Ivan, it works perfectly now, finally!  
BR  
Mike

---

<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:** [March 16, 2021, 8:52pm UTC](https://forum.knime.com/t/denormalizing-after-mlp/30755/14 "2021-03-16T20:52:20Z")

</div>

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