Need help (very new to this field)

Hi guys,
Just downloaded Knime today! Going to go through the webinar and youtube course, but Had a basic query.

Suppose I have a dataset and I want to do a particular arithmetic operation (For example : A list of the Close of a particular stock over 100 days), and I want to do a particular arithmetic operation on it (Create a weighted moving average for example), how do I do this? Essentially, If i require to transform the data using a particular mathematic formula what is the process?

Thanks

Hi there!

Welcome to the KNIME community!

For arithmetic operations on data there is Math Formula node but calculating moving average there is dedicated node called Moving Average which might do the job.

When I started with KNIME this blog post was very helpful for me so check it as well :wink:
https://www.knime.com/blog/seven-things-to-do-after-installing-knime-analytics-platform

Happy KNIMEing!

Br,
Ivan

2 Likes

Got a better understanding of how to use the software. Still confused about mixing conditional logic with arithmetic operators.

I have a column of data. If the current value is greater than the previous value, I want a difference of the two to be displayed in a second column. Else if it is lesser it should Display the difference in a third column (measuring relative upwards and downward movement of price).

I have introduced a lag column and now im stuck :stuck_out_tongue:
Also Should I upload my workflow here (how can i show my poor work? XD)

Hi there!

Glad you did. For conditional logic there is Rule Engine node (no arithmetic operations!) which can follow Lag node (I guess you used it for creating lag column you mentioned) and for conditional logic combined with arithmetic operations there is Column Expressions node. Column Expressions node needs to be installed it as it is part of extension - Installing KNIME extensions.

Sure you can upload your workflow here and someone will (hopefully) take a look at it and advise you or adjust it to your needs. For Exporting KNIME workflows check this video - Import/Export KNIME workflow

My advice is to explain what you need with an example of your input and your output data - dummy data or subset of real data just to get the picture. This is proven to be very helpful as forum members to not have to guess what you wanted to say. Sometimes words are enough but data is what we all enjoy working with :wink:

Br,
Ivan

2 Likes

In addition to all the helpful information on the KNIME pages, this forum, their Learning hub, the live seminars, the online self-training, the white papers, the Youtube channel, the books, the Nodepit and the many examples now there is a full blown Udemy course for KNIME, and the best thing: it is free :slight_smile:

4 Likes

Loving this community already!
Here is my basic requirement.

For a column of data, If the current value is greater than the previous value, a column should record upward movement (column (i)-(column(i-1)), if it is lesser, then another column should measure downward movement (column(i-1)-column(i))
Column 1 (without transformation)
10
12
5
6
4
2
4
4
6
8
5

After Transformation
Column 1------------Upward Movement----------------Downward Movement
10-----------------------------0--------------------------------------0
12-----------------------------2--------------------------------------0
5-------------------------------0--------------------------------------7
6-------------------------------1--------------------------------------0
4-------------------------------0--------------------------------------2
2-------------------------------0--------------------------------------2
4-------------------------------2---------------------------------------0
4-------------------------------0--------------------------------------0
6-------------------------------2--------------------------------------0
8-------------------------------2--------------------------------------0
5-------------------------------0--------------------------------------3

p.s Dont know how to post a table here so I made this temporary one :stuck_out_tongue:

1 Like

Hi @aravindujjwal,
take a look at the following workflow. The trick is to use the max_in_arguments function in the Math Formula node.

Upward-Downward movement.knwf (8.8 KB)

best,
Gabriel

2 Likes

wow! that is a very creative solution! so, is this a common method of creating conditional +mathematical formulas?
Im planning on setting up lots of formulas for some data, so for these kind of operations (essentially transforming data similar to excel), is there a method or is it formula based?

Hi there!

That is also a smart solution!

I would say there is no common method but certain nodes are pretty handy and more used as Rule Engine, Math Formula and Math Formula (Multi Column), Column Expressions, Joiner, Lag Column, Transpose… All in combination with various loops of course… So using your knowledge of KNIME nodes and your creativity should do the trick. And don’t forget to give back to community :smiley:

There is also book From Excel to KNIME you want to check out if coming from Excel world :wink:

Br,
Ivan

2 Likes

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