Answers.Body: <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Closed Loop Network</th>
  <th>Step-Ahead Prediction Network</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>The function CLOSELOOP replaces the feedback input with a direct connection from the output layer.</td>
  <td>Step-Ahead Prediction Network also known as <code>removedelay</code> function helps to remove delay to neural network’s response</td>
  </tr>
  <tr>
  <td>In Closed loop networks, its own predictions become the feedback inputs.</td>
  <td>targets with a delay were used as feedback input</td>
  </tr>
  <tr>
  <td>Network used to do multi-step prediction</td>
  <td>Network used to predict one step ahead</td>
  </tr>
  <tr>
  <td>Highly helpful to turn the network into parallel configuration</td>
  <td>Can't be used for parallel configuration</td>
  </tr>
  <tr>
  <td>Output is not shifted one timestep</td>
  <td>the output is shifted one timestep.</td>
  </tr>
  <tr>
  <td>Closed loop network continue to predict when external feedback is missing, by using internal feedback</td>
  <td>Open-loop and Remove-delay use external feedback</td>
  </tr>
  <tr>
  <td>Real time Configuration</td>
  <td>Not real time configuration</td>
  </tr>
  <tr>
  <td>Closed loop network will produce output for the time extent of the input.</td>
  <td>will produce output for the common time extent of the input and target.</td>
  </tr>
  <tr>
  <td><a href="https://i.sstatic.net/SOOkX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/SOOkX.png" alt="Closed Loop Network" /></a></td>
  <td><a href="https://i.sstatic.net/64AfF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/64AfF.png" alt="Step-Ahead Prediction Network" /></a></td>
  </tr>
  </tbody>
  </table>
  </div>
  <p><strong>Open-Loop Network</strong>
  In open-loop networks, targets were used as feedback inputs. Open loops are primarily used when future outputs are not known. Below is how open loop network looks like
  <em>Note:</em></p>
  <blockquote>
  <p>The typical workflow is to fully create the network in open loop, and only when it has been trained (which includes validation and testing steps) it is transformed to closed loop for multistep-ahead prediction</p>
  </blockquote>
  <p><a href="https://i.sstatic.net/0fVAN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0fVAN.png" alt="Open loop network" /></a></p>
  <p><strong>UPDATED Response to newly added questions</strong></p>
  <blockquote>
  <p>&quot;The desired output, AKA the delayed target, is used as an additional input.&quot; how is this?</p>
  </blockquote>
  <p>This is with reference to the Step-Ahead prediction network. Here, the delayed target is used as an additional input. Kindly refer to diagram in point #9. when the target is <code>y(t+1)</code> the additional input is the delayed target, i.e., <code>y(t)</code>. Whereas in open-loop target is used as additional input this is the main difference between OL and step ahead prediction.</p>
  <blockquote>
  <p>&quot;The OL net will produce output for the common time extent of the input and target.&quot; and this?</p>
  </blockquote>
  <p>As you can see, the open-loop network  will produce output <code>y(t) as long as open-loop has two inputs </code>x(t)<code>and the target</code>y(t)` for a certain time</p>
  <blockquote>
  <p>&quot;The CL net will produce output for the time extent of the input.&quot; What does this mean?</p>
  </blockquote>
  <p>In closed loop based on the input x(t) the output y(t) will be produced for a certain time</p>
  <p><strong>Reference Link:</strong></p>
  <ul>
  <li><a href="https://au.mathworks.com/help/deeplearning/gs/neural-network-time-series-prediction-and-modeling.html;jsessionid=fe7adf7e9763a5ed21e2953cfd9d" rel="nofollow noreferrer">Official Documentation</a></li>
  <li><a href="https://www.mathworks.com/matlabcentral/answers/14970-neural-network-multi-step-ahead-prediction" rel="nofollow noreferrer">Discussion on Closed Loop(multi step ahead prediction)</a></li>
  <li><a href="https://ieeexplore.ieee.org/document/6044279" rel="nofollow noreferrer">Multi-step ahead prediction using neural networks</a></li>
  <li><a href="https://au.mathworks.com/help/deeplearning/ug/maglev-modeling.html" rel="nofollow noreferrer">Example of Closed loop, open-loop and remove delay</a></li>
  <li><a href="https://au.mathworks.com/help/deeplearning/ug/multistep-neural-network-prediction.html" rel="nofollow noreferrer">Multi-step Neural Network prediction</a></li>
  <li><a href="https://www.mathworks.com/matlabcentral/answers/419410-what-s-the-difference-between-narx-open-loop-remove-delay-and-closed-loop-to-forecast-n-steps-ahea" rel="nofollow noreferrer">Difference between Open loop, Closed loop</a></li>
  <li><a href="https://itectec.com/matlab/matlab-neural-network-closed-loop-vs-open-loop/" rel="nofollow noreferrer">Additional difference information</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-27T02:25:59.130Z
Answers.Text: Some of the text here appears to have been copy-pasted from an external source, without attribution -- e.g., "continue to predict when external feedback is missing, by using internal feedback" appears to have been copied from https://www.mathworks.com/help/deeplearning/ug/multistep-neural-network-prediction.html or another source.  The images also appear to have been copied, e.g., from the same article, and https://www.mathworks.com/help/deeplearning/gs/neural-network-time-series-prediction-and-modeling.html, and so on.
Answers.UserDisplayName: D.W.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-27T02:26:05.420Z
Answers.Text: [Plagiarism](https://ai.stackexchange.com/help/referencing) is [not cool](https://meta.stackexchange.com/questions/83955/plagiarism-should-be-addressed-specifically-in-the-faq/134715#134715).
Answers.UserDisplayName: D.W.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-14T18:34:45.947Z
Answers.LastActivityDate: 2021-10-18T17:12:31.510Z
Answers.LastEditDate: 2021-10-18T17:12:31.510Z
Answers.UserDisplayName: Archana David
Body: <p>I've come across two types of neural networks to predict, both from Matlab, the closed structure and the net that removes one delay to find new data.</p>
  <p>From Matlab's app generated scripts we see:</p>
  <blockquote>
  <p>% Closed Loop Network
  % Use this network to do multi-step prediction.
  % The function CLOSELOOP replaces the feedback input with a direct
  % connection from the output layer.</p>
  </blockquote>
  <pre><code>netc = closeloop(net);
  netc.name = [net.name ' - Closed Loop'];
  view(netc)
  [xc,xic,aic,tc] = preparets(netc,{},{},T);
  yc = netc(xc,xic,aic);
  closedLoopPerformance = perform(net,tc,yc)
  </code></pre>
  <blockquote>
  <p>% Step-Ahead Prediction Network
  % For some applications it helps to get the prediction a timestep early.
  % The original network returns predicted y(t+1) at the same time it is
  % given y(t+1). For some applications such as decision making, it would
  % help to have predicted y(t+1) once y(t) is available, but before the
  % actual y(t+1) occurs. The network can be made to return its output a
  % timestep early by removing one delay so that its minimal tap delay is now
  % 0 instead of 1. The new network returns the same outputs as the original
  % network, but outputs are shifted left one timestep.</p>
  </blockquote>
  <pre><code>nets = removedelay(net);
  nets.name = [net.name ' - Predict One Step Ahead'];
  view(nets)
  [xs,xis,ais,ts] = preparets(nets,{},{},T);
  ys = nets(xs,xis,ais);
  stepAheadPerformance = perform(nets,ts,ys)
  </code></pre>
  <p>My question is: What is the real difference between them?</p>
  <p>Can one uses them equivalently? If yes, why? I mean, even tho the structure or how they are equipped, could be very very different, e.g. one is apple, the other is grape?</p>
  <p>As far as I understand both can return new data if one codes them for that. For example, taking the closed net, one can predict 10 new values. Taking the net that removes one delay, one can predict one new value, but if one does this recursively 9 times, one can get the new 10 data. Is there a problem in using this last net in that way?</p>
  <p>On another side, running both codes, as they are now (this changes depending on the code one works on), yields very different performances. Why?</p>
  <p>Update:</p>
  <p>I've checked this page <a href="https://www.mathworks.com/matlabcentral/answers/297187-neural-network-closed-loop-vs-open-loop" rel="nofollow noreferrer">https://www.mathworks.com/matlabcentral/answers/297187-neural-network-closed-loop-vs-open-loop</a>, and in the <a href="https://www.mathworks.com/matlabcentral/answers/297187-neural-network-closed-loop-vs-open-loop#answer_230163" rel="nofollow noreferrer">answer</a> by Greg Heath, we see</p>
  <p>[...]</p>
  <blockquote>
  <p>OPENLOOP: The desired output, AKA the delayed target, is used as an additional input. The OL net will produce output for the common time extent of the input and target.
  CLOSELOOP: The delayed target input is replaced by a direct delayed output connection. The CL net will produce output for the time extent of the input.</p>
  </blockquote>
  <p>[...]</p>
  <p>&quot;The desired output, AKA the delayed target, is used as an additional input.&quot; how is this?</p>
  <p>&quot;The OL net will produce output for the common time extent of the input and target.&quot; and this?</p>
  <p>&quot;The CL net will produce output for the time extent of the input.&quot; What does this mean?</p>
  
Tags: <neural-networks><comparison><prediction><feedforward-neural-networks><matlab>
Title: Closed networks vs Networks with a removed delay to predict new data
UserDisplayName: Verónica Rmz.
ThreadText: # Closed networks vs Networks with a removed delay to predict new data
  
  (Asked by: username_0 on 2021-10-12)
  
  I've come across two types of neural networks to predict, both from Matlab, the closed structure and the net that removes one delay to find new data.
  From Matlab's app generated scripts we see:
  
  % Closed Loop Network
  % Use this network to do multi-step prediction.
  % The function CLOSELOOP replaces the feedback input with a direct
  % connection from the output layer.
  
  netc = closeloop(net);
  netc.name = [net.name ' - Closed Loop'];
  view(netc)
  [xc,xic,aic,tc] = preparets(netc,{},{},T);
  yc = netc(xc,xic,aic);
  closedLoopPerformance = perform(net,tc,yc)
  
  
  % Step-Ahead Prediction Network
  % For some applications it helps to get the prediction a timestep early.
  % The original network returns predicted y(t+1) at the same time it is
  % given y(t+1). For some applications such as decision making, it would
  % help to have predicted y(t+1) once y(t) is available, but before the
  % actual y(t+1) occurs. The network can be made to return its output a
  % timestep early by removing one delay so that its minimal tap delay is now
  % 0 instead of 1. The new network returns the same outputs as the original
  % network, but outputs are shifted left one timestep.
  
  nets = removedelay(net);
  nets.name = [net.name ' - Predict One Step Ahead'];
  view(nets)
  [xs,xis,ais,ts] = preparets(nets,{},{},T);
  ys = nets(xs,xis,ais);
  stepAheadPerformance = perform(nets,ts,ys)
  
  My question is: What is the real difference between them?
  Can one uses them equivalently? If yes, why? I mean, even tho the structure or how they are equipped, could be very very different, e.g. one is apple, the other is grape?
  As far as I understand both can return new data if one codes them for that. For example, taking the closed net, one can predict 10 new values. Taking the net that removes one delay, one can predict one new value, but if one does this recursively 9 times, one can get the new 10 data. Is there a problem in using this last net in that way?
  On another side, running both codes, as they are now (this changes depending on the code one works on), yields very different performances. Why?
  Update:
  I've checked this page https://www.mathworks.com/matlabcentral/answers/297187-neural-network-closed-loop-vs-open-loop, and in the answer by Greg Heath, we see
  [...]
  
  OPENLOOP: The desired output, AKA the delayed target, is used as an additional input. The OL net will produce output for the common time extent of the input and target.
  CLOSELOOP: The delayed target input is replaced by a direct delayed output connection. The CL net will produce output for the time extent of the input.
  
  [...]
  "The desired output, AKA the delayed target, is used as an additional input." how is this?
  "The OL net will produce output for the common time extent of the input and target." and this?
  "The CL net will produce output for the time extent of the input." What does this mean?
  
  **Tags:** neural-networks, comparison, prediction, feedforward-neural-networks, matlab
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-10-14. Score: 0
  
  | Closed Loop Network | Step-Ahead Prediction Network |
  | --- | --- |
  | The function CLOSELOOP replaces the feedback input with a direct connection from the output layer. | Step-Ahead Prediction Network also known as `removedelay` function helps to remove delay to neural network’s response |
  | In Closed loop networks, its own predictions become the feedback inputs. | targets with a delay were used as feedback input |
  | Network used to do multi-step prediction | Network used to predict one step ahead |
  | Highly helpful to turn the network into parallel configuration | Can't be used for parallel configuration |
  | Output is not shifted one timestep | the output is shifted one timestep. |
  | Closed loop network continue to predict when external feedback is missing, by using internal feedback | Open-loop and Remove-delay use external feedback |
  | Real time Configuration | Not real time configuration |
  | Closed loop network will produce output for the time extent of the input. | will produce output for the common time extent of the input and target. |
  | [Closed Loop Network](https://i.sstatic.net/SOOkX.png) | [Step-Ahead Prediction Network](https://i.sstatic.net/64AfF.png) |
  
  **Open-Loop Network**
  In open-loop networks, targets were used as feedback inputs. Open loops are primarily used when future outputs are not known. Below is how open loop network looks like
  *Note:*
  
  > The typical workflow is to fully create the network in open loop, and only when it has been trained (which includes validation and testing steps) it is transformed to closed loop for multistep-ahead prediction
  
  [![Open loop network](https://i.sstatic.net/0fVAN.png)](https://i.sstatic.net/0fVAN.png)
  
  **UPDATED Response to newly added questions**
  
  > "The desired output, AKA the delayed target, is used as an additional input." how is this?
  
  This is with reference to the Step-Ahead prediction network. Here, the delayed target is used as an additional input. Kindly refer to diagram in point #9. when the target is `y(t+1)` the additional input is the delayed target, i.e., `y(t)`. Whereas in open-loop target is used as additional input this is the main difference between OL and step ahead prediction.
  
  > "The OL net will produce output for the common time extent of the input and target." and this?
  
  As you can see, the open-loop network will produce output `y(t) as long as open-loop has two inputs` x(t)`and the target`y(t)` for a certain time
  
  > "The CL net will produce output for the time extent of the input." What does this mean?
  
  In closed loop based on the input x(t) the output y(t) will be produced for a certain time
  
  **Reference Link:**
  
  * [Official Documentation](https://au.mathworks.com/help/deeplearning/gs/neural-network-time-series-prediction-and-modeling.html;jsessionid=fe7adf7e9763a5ed21e2953cfd9d)
  * [Discussion on Closed Loop(multi step ahead prediction)](https://www.mathworks.com/matlabcentral/answers/14970-neural-network-multi-step-ahead-prediction)
  * [Multi-step ahead prediction using neural networks](https://ieeexplore.ieee.org/document/6044279)
  * [Example of Closed loop, open-loop and remove delay](https://au.mathworks.com/help/deeplearning/ug/maglev-modeling.html)
  * [Multi-step Neural Network prediction](https://au.mathworks.com/help/deeplearning/ug/multistep-neural-network-prediction.html)
  * [Difference between Open loop, Closed loop](https://www.mathworks.com/matlabcentral/answers/419410-what-s-the-difference-between-narx-open-loop-remove-delay-and-closed-loop-to-forecast-n-steps-ahea)
  * [Additional difference information](https://itectec.com/matlab/matlab-neural-network-closed-loop-vs-open-loop/)
  
  > **Comments:**
  > **username_2**: Some of the text here appears to have been copy-pasted from an external source, without attribution -- e.g., "continue to predict when external feedback is missing, by using internal feedback" appears to have been copied from https://www.mathworks.com/help/deeplearning/ug/multistep-neural-network-prediction.html or another source.  The images also appear to have been copied, e.g., from the same article, and https://www.mathworks.com/help/deeplearning/gs/neural-network-time-series-prediction-and-modeling.html, and so on.  
  > **username_2**: [Plagiarism](https://ai.stackexchange.com/help/referencing) is [not cool](https://meta.stackexchange.com/questions/83955/plagiarism-should-be-addressed-specifically-in-the-faq/134715#134715).  
  
  ---
  
  