LSTM - Jürgen Schmidhuber & Felix Ger approach - math

I'm reading the thesis of Felix Ger and I'd like to know how can I spot in a simple keras implementation the next part of this thesis : "... Previous tasks already required the LSTM network to act upon events that occurred 50 discrete time steps ago, independently of what appened over the intervenin 49 steps . Right before the critical moment, however, there was a helpful "marker" input informing the network that its next action would be crucial. ..."
what does he mean there was a helpful "marker" input informing the network ? ... Which "marker" input was mentioned before that chapter ?
Thanks in advance.
PS. If you consider that this thesis is not ok to understand LSTM please tell me.

Related

igraph Components: Which Algorithm (citation)?

I'm using igraph in academic research and I need to provide a proper citation for the algorithm used in the components() command. This algorithm returns the connected components of the graph. The command in question is documented here. It's part of the R/CRAN igraph library.
I think the algorithm used is the one below, which seems to be the canonical workhourse algoirthm cited on the Wikipedia page for connected components.
Hopcroft, J.; Tarjan, R. (1973), "Algorithm 447: efficient algorithms for graph manipulation", Communications of the ACM, 16 (6): 372–378, doi:10.1145/362248.362272
Does anyone know what algorithm is used?
It should be noticed that, igraph in R is actually written in c/c++. If you want to dig into the the details about how components is implemented, you should trace back to its c or c++ source code.
Here is a link to the source code for components
https://github.com/igraph/igraph/blob/f9b6ace881c3c0ba46956f6665043e43b95fa196/src/components.c
However, it seems the algorithm applied is not mentioned in the source code. I guess you can reach the author by email and ask for help.

Dymola integration with R

Someone has script examples for integrating R and Dymola,
I want to perform Monte Carlo Simulations in a Dymola model
the main idea will be performing an uncertainty analysis regarding the integration of renewables into the system.
we have a calibrated model of a building which is heated by a gas fired boiler, and we are going to implement a solar collector and a biomass gas fired boiler and check the probability of x% of the energy demand to be covered by the integrating y% of renewables
But I am struggling to learn how I can make R sample, call my model and analyse the results
I do not have experience with R
Can anyone help me?
thanks
I have no experience with R but Dymola offers the following possibilities to remote control it:
Python
Java (Script)
DDE e.g. from MATLAB
Some others that don't seem relevant for this case (can be found in Dymola Manual 2 Section 6)
There is no possibility to call it directly from R as far as I know. What you can do as well is call dymosim.exe directly and modify the dsin.txt to get your parameters in the model.
From my experience I would tend to use the Python interface. Probably a good way could be to combine R and Python as presented here: https://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock/r/rpy
In addition to the possibilities listed by Markus Andres, there is another method which is used quite often:
Calling the Dymola.exe the path to a .mos script as first argument.
Dymola will start up and immediately execute the .mos script.
A minimal .mos script would be:
openModel("<path-to-model>/MyModel.mo")
simulateModel("MyModel")
Modelica.Utilities.System.exit()
Note that you can not interact with Dymola using this method, so the exit() call is crucial. If the exit() call is not reached for whatever reason, the Dymola.exe will continue to run as idle process and you have to kill the process from R.
The Dymola User Manual Volume 1 also mentions this feature briefly in the section Parameter studies by running Dymola a number of time in “batch mode” and gives some hints how to log messages and set the result file names.

How to find and plot Implied volatility in R

I'm writing because I want to find and plot implied volatility to the BS model using R. However, I'm not used to coding in R and I honestly don't know where to start so I wanted to ask if anyone on this forum has written such a code in R and therefor maybe could bed able to help me?
Thanks a lot!
Edit: I see I may have offended a few people by simply asking for code. I apologize for that. All I perhaps need to ask is where people on this forum usually get financial data to use in R from?
Mads
Posted by: Renato Vitolo
Quantitative risk analyst at Banca Monte dei Paschi di Siena
Error handling is not stupendous, I ought to admit, but it's past bedtime. Try this from an R terminal:
source(url("http://empslocal.ex.ac.uk/people/staff/rv211/BS/BS-Newton.R"))
Example 1: data taken from http://www.maxi-pedia.com/Black+Scholes+model
Example 2: data taken from http://voices.yahoo.com/the-black-scholes-formula-practice-problems-solutions-1297845.html?cat=4

process spot images R pa

I have a SPOT image (bands 1 to 4) in DN and I need to transform them to reflectance values. Does anyone know any package in R that can help with that?
Thank you all..
Nora
It would be interesting to know the application of SPOT images you are planning. Atmospheric and radiometric Correction may be unnecessary in a number of circumstances.
There is no specific package for dealing with SPOT image but you could adapt functions provided by landsat package.
There are good references dealing with SPOT application and raw DN transformation to accommodate atmospheric and radiometric corrections. I'd say that Song et al 2001 is a fundamental reading but see Clark dissertation.
You'll find the Spot reference tables, similar to those available for Landsat.
Let us know if you found a solution.

JIT of R code using Ra

I just discovered Ra from Ubuntu repositories. Has anyone used it in actual projects? Have you encountered any problems and are there any trade offs with using Ra instead of R or JIT in general?
Well, I like it. But then it is in Ubuntu ... because I created the Debian package in the first place. And I feature Ra and jit in my 'Intro to High-Performance Computing with R' tutorials (next one on Tuesday at useR! 2010).
But sadly, Steven never got the feedback he anticipated and has stopped updating Ra. The most recent version is R 2.9.*, i.e. from a year ago. This would be worth keeping alive, but a few more people (with highly specialized knowledge) would need to appear on the scene to help...
Since this question was asked the {compiler} R package was introduced. I wrote a post describing what I have found this far regarding the use of JIT and R:
http://www.r-statistics.com/2012/04/speed-up-your-r-code-using-a-just-in-time-jit-compiler/
The post describes some advances since what Dirk wrote in his reply (several of the links in the post are actually to Dirk's newer articles regarding this topic)
I hope this help future R people searching on this topic.

Resources