Comments on: CNTK 106 Tutorial – Time Series prediction with LSTM using C# /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/ All about technology: ML, .NET, EA, FEM, Math... Wed, 24 Jun 2020 09:25:17 +0000 hourly 1 http://wordpress.com/ By: Sebastian /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-112619 Wed, 24 Jun 2020 09:25:17 +0000 http://bhrnjica.net/?p=7228#comment-112619 In reply to Sebastian.

OK,

I found the solution: I changed “AnyCPU” to “x64”

Now working…

]]>
By: Sebastian /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-112618 Wed, 24 Jun 2020 09:05:35 +0000 http://bhrnjica.net/?p=7228#comment-112618 Hello,

Thanks for this great article. I took the code from your link above opened and run it. Sadly, in button1_Click(…) the call of

Task.Run(() => train(…));

runs to nowhere. A breakpoint at start of private void train(…) won’t be reached.

VS 2019 with .NET Framework 4.7.1 and
System.ValueTuple
Microsoft.Net.Compilers
installed.

Any ideas?

Thanks in advance
Sebastian.

]]>
By: Alex Ma /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-84103 Tue, 01 Jan 2019 10:20:54 +0000 http://bhrnjica.net/?p=7228#comment-84103 In reply to Alex Ma.

I am sorry that I lose the description as a source code attached.
Additional note that if your compiler required C# 7, you will need to install
System.ValueTuple
Microsoft.Net.Compilers
in your NutGet.

]]>
By: Alex Ma /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-84102 Tue, 01 Jan 2019 10:12:08 +0000 http://bhrnjica.net/?p=7228#comment-84102 Great explanation and easy to understand for beginners.
If there is a C# project that we can download so that without confusing in environment setup.
Thank you indeed for your consideration and reply

]]>
By: CNTK C# LSTM Examples – ioloiip /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-83424 Mon, 26 Nov 2018 14:05:04 +0000 http://bhrnjica.net/?p=7228#comment-83424 […] Sine wave predictor CNTK 106 Tutorial – Time Series prediction with LSTM using C# […]

]]>
By: Bahrudin Hrnjica /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-83305 Mon, 19 Nov 2018 12:50:34 +0000 http://bhrnjica.net/?p=7228#comment-83305 In reply to rickhaar.

Missing values must be fixed prior to create data sets.CNTK assume all data is available and prepared for training.

]]>
By: rickhaar /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-83304 Mon, 19 Nov 2018 12:19:03 +0000 http://bhrnjica.net/?p=7228#comment-83304 Great explanation, many thanks. I’m training and it seems to work. I don’t want to take advantage of your kindness, but…. If I understand correctly, the two output values (labels) should be set equal and the dense layer uses these two results to generate a more precise value? Is it right to leave the number of hidden lstm layers equal to 1? Also what do you suggest to do if in some cases I have a missing value (feature) in the sequence?

]]>
By: Bahrudin Hrnjica /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-83299 Sun, 18 Nov 2018 19:39:45 +0000 http://bhrnjica.net/?p=7228#comment-83299 In reply to rickhaar.

Right, you have typical multi-variant time series case. So the previous case is repeated two times.

Say we have two time series:
ts1: w1,w2,w3,w4,w5,w6,w7,…, w10000
ts2: r1,r2,r3,r4,r5,r6,r7,…, r10000

and want to build one network model with 10 features (5+5) each and two labels (1+1)
Two time series are tranformed into data frame like the following:

feature1, feature2, feature3, …., feature9, feature10, label1, label2
w1, r1, w2, r2, w3, r3, w4, r4, w5, r5, w6, r6
w1,r2,w3, r3, w4, r4, w5, r5,w6,r6, w7,r7
……

So the answer:
Feature dimension=10
Label dimension = 2

]]>
By: rickhaar /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-83295 Sun, 18 Nov 2018 19:17:47 +0000 http://bhrnjica.net/?p=7228#comment-83295 In reply to Bahrudin Hrnjica.

Many thanks for the clarification, what should I do if instead of one I had two input signals (ie one sine wave and one square wave) to predict a single output value?

]]>
By: Bahrudin Hrnjica /2017/12/07/cntk-106-tutorial-time-series-prediction-with-lstm-using-c/#comment-83293 Sun, 18 Nov 2018 18:14:53 +0000 http://bhrnjica.net/?p=7228#comment-83293 In reply to rickhaar.

Actually the example uses 5 features, because the sine function (time series data) is transformed into data frame with 5 features and one label.

First the sin wawe function is generated for 10 000 values. Those 10 000 values are transformed into data frame with 5 features and one label.

For example: let w1,w2,w3,w4,w5,w6,w7,…, w10000 represent sin values. The data frame with 5 features is generated on the following way.

feature1, feature2, feature3, feature4, feature5, label
w1, w2, w3, w4, w5, w6,
w2, w3, w4, w5, w6, w7,
……
. w9999, w10000

On this way we got data frame with 6 columns (5 features and one label ) and 9994 rows.

So the answer:
Feature dimension=5
Label dimension = 1.

Since label dimension is 1- this is typical regression problem.

Hope this help.

]]>