« first day (2929 days earlier)      last day (1538 days later) » 

12:21 AM
@CarlLange I thought the Linguist is only used to detect languages and not for syntax highlighting.
 
 
11 hours later…
11:49 AM
@CarlLange @JimB Do either of you use TimeSeries / TemporalData ?
I'm struggling to do basic things with it
Here's for example the result from 100 epidemic simulations on a graph (SIR model): cloud.mpi-cbg.de/index.php/s/hVgqBtaC4tdxsan
It's a single TemporalData that contains 100 TimeSeries
Each TimeSeries contains 3 values at each time point: S, I, R
How would I extract just one (e.g. just I) from the TemporalData, without disassembling the whole thing first?
How would I quickly show that S+I+R = constant in time?
How would I plot all 100 paths for S in one colour for I in a 2nd colour and for R in a third without 100 calls to ListLinePlot? Show[ListLinePlot[#, PlotStyle -> Opacity[0.2]] & /@ td["Components"]] works, but ugly and slow
I am not sure if I'm just being stupid or if this is really badly documented
 
12:22 PM
Diassenble: td["PathComponents"]
But where is this documented? I can't find it anywhere. It was a guess based on "PathComponent", which appears in an example, but is again not documented
 
 
2 hours later…
2:45 PM
@Szabolcs is something like td["Path"][[All, 2, 2]] what you're looking for?
 
@Szabolcs How did you make the data?
 
2:57 PM
@halirutan @Kuba Yes, the vendor readme that I linked to lists all the packages they use for syntax highlighting. So if we want to improve the Github syntax highlighting for WL, the package that we need to improve or replace is this one, as listed by the vendor readme: github.com/shadanan/mathematica-tmbundle
It looks like there's a relatively straightforward syntax definition XML - however I don't know if the format allows us to eg give a list of specific keywords (I assume it does though). However, the colours that github uses for syntax highlighting almost certainly won't change.
(Or rather, they'll change with github site-wide redesigns)
@Szabolcs I've used it in the past but probably can't help you - I also find TemporalData pretty poorly documented. Kind of like Dataset - great if you're using the narrow critical path, not that great if you want to do anything out of the ordinary.
 
3:32 PM
@Szabolcs I think a minimal rewording of your problem is "how to get TemporalData[{{1, 10}, {2, 1}, {3, 30}}] from TemporalData[{{1, {10, 11, 6}}, {2, {1, 15, 7}}, {3, {30, 5, 1}}}]without disassembling". After having read some kilometers of documentation, I think this is badly documented. The solution is : TemporalData[{{1, {10, 11, 6}}, {2, {1, 15, 7}}, {3, {30, 5, 1}}}]["PathComponent", 1] .
To select several values, one can do TemporalData[{{1, {10, 11, 6}}, {2, {1, 15, 7}}, {3, {30, 5, 1}}}]["PathComponent",{ 1,2}] . See here
 
 
2 hours later…
6:01 PM
Thank you @andre314 for that! @Szabolcs I use the Time Series and Random Function routines only infrequently. But part of that infrequency of use is the meager documentation (and for me, confusing documentation: I see the initial definitions of the functions and the parameters but then some of the examples (again, maybe it's just me) don't seem to match the parameter patterns).
My other issue with the time series/random functions is that there appears to be two kinds one functions: one includes standard errors (TimeSeriesModelFit) and one just includes the parameter estimates (EstimatedProcess). I have the same issue with NonlinearModelFit (which has standard errors) and FindFit (which only gives parameter estimates).
 
@ChrisK I was exposing igraph's SIR model functionality in IGraph/M and I was looking for a good data structure to return. In principle, TemporalData is perfect, but I was not at all experienced with it.
Here's the documentation I wrote up so far (it's just one function): cloud.mpi-cbg.de/index.php/s/JHF70KzRp6KpMSN
@CarlLange The out of ordinary thing I want to do is to let it extrapolate into the future by assuming that values no longer change
Basically the same question, except that the solutions there do not apply perfectly:
4
Q: Is there some way to implement automatic TimeSeries extrapolation or series continuation?

Michael SternI am working with a large number of TimeSeries of irregular length. This means that if I sum them, or compute the mean, it cuts off at the terminus of the shortest series. Is there a convenient way to make it compute to the end of the longest series, assuming that the missing data did not change?...

igraph's SIR function produces many simulation runs simultaneously. The time points of events are different in each run. The events are not on a regular temporal grid. Therefore, we do need interpolation.
The values are integers (number of infected nodes), so ideally we should not have higher-than-0 order interpolation.
The simulation stops when there are no longer any infected nodes.
This happens at different times for each run. For some runs, it may happen after just one event (with some probability, the single infected person recovers used as initial condition recovers before he can spread the disease)
Therefore, it is not possible to e.g. average the time series from multiple runs in a straightforward way
One must "extrapolate" by assuming that the last value does not change.
Luckily, InterpolationOrder->0 seems to do exactly that
 
 
2 hours later…
8:17 PM
Anyone know what's wrong with the following example?
DynamicModule[
 {},
 ExpressionCell[Dynamic@EvaluationCell[]]
 ]
Removing any single thing (the DynamicModule, the ExpressionCell wrapper, the Dynamic or even replacing the EvaluationCell[] with e.g. 1) makes the error go away
Furthermore, copying the output and pasting it again seems to fix the issue...
 
@Szabolcs thanks, looks interesting!
 

« first day (2929 days earlier)      last day (1538 days later) »