close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 20 years ago

Closed 20 years ago

#260 closed defect (invalid)

Same TimeSet in input and output makes Estimate to crash

Reported by: César Pérez Álvarez Owned by: Víctor de Buen Remiro
Priority: high Milestone:
Component: Math Version: head
Severity: major Keywords:
Cc:

Description

If we use this code:



FUNCTIONS

Serie CalProof(TimeSet dating)
{ CalInd(Diario, dating) };


PROCEDURES

Serie InputSer = CalProof(Diario);

Serie Output = SubSer(Gaussian(0, 1, Diario), y2000m01d01, y2004m01d01);
Set Input = SetOfSet(InputDef(0.1, InputSer));

Set Model = ModelDef
(

Output,
1,
0,
1,
0,
1,
SetOfPolyn(1 , 1),
SetOfPolyn(1 , 1 ),
Input,
AllLinear

);

Set Estim = Estimate(Model, First(Output), Last(Output));


Estimate does not run and we obtain the following error:


2005/05/11 19:13:09 : Begins Data charging
Charging data for output serie between y2000m01d01 and y2004m01d01Initialized
mt19937 with seed = 1883502856 using random256-bsd(390686191)

Differenced output norm : 0.978785
Charging data for input series between y1999m12d31 and y2004m01d01
ERROR: Incompatible dating on output and/or inputs series. Estimate was unable
to retrieve data for input time series.

Time Data charging 0 secondsIncluded file


If we see the functions CalProof and we change this functions with this main body:

Serie CalProof(TimeSet dating)
{ CalInd(Diario, Diario) };

Estimate runs.

It is very rare because we can operate with InputSer with a serie in Diario but
Estimate, in the first case, does not recognize dating argument in CalProof
functions as Diario.

Change History (1)

comment:1 Changed 20 years ago by Víctor de Buen Remiro

Resolution: invalid
Status: newclosed

Ave Cesar

Well, it's a very old problem to handle with virtual objects like TimeSet's. It's too
easy to compare two numbers or two dates in order to know if they are equals or
not, but it's very difficult to compare two virtually infinite TimeSet's. It would
needed to use a symbolic analytical system to do it because it's no possible make
an explicit comparisson of them.

When you pass a TimeSet or any other object to a function like your CalProof one,
a local reference is created. So a new internal object is used as the TimeSet of the
returned Serie and forward comparissons of TimeSet's will not recognize as the
same object as original one. It would be easy to change TOL to improve this
feature but then all comparissons would be affected by a unneeded delay and time
proccess would be affected because object's comparisson is one of the more used
functions by a lot of internal TOL processing.

The solution adopted ten years ago, was to use Text arguments instead of
TimeSet, its to say, your function should be changed by this

Serie CalProof(Text datingName)
{ CalInd(Diario, Eval(datingName)) };

Afterwords you must to call it in this way

Serie InputSer = CalProof("Diario");

And it will work fine!

Thanks for use this channel

Note: See TracTickets for help on using tickets.