mmcdara

7891 Reputation

22 Badges

9 years, 62 days

MaplePrimes Activity


These are replies submitted by mmcdara

@vv 

we crisscrossed

@lcz 

I remember I asked a question about the displaying order, maybe a year ago.
@acer gave me some informations about the but I'm not capable to find he's reply

@lcz 

That's normal: given the symmetry of your problem  last = 1-first. and I used this as a shortcut.
Here is the general version

Download Disk+Bezier_2.mw

(Note that there could remain situations where the drawing is still incorrect, 
the culprit lines then are these ones

first := select(is, [solve(((f(t)-x0)^2+(g(t)-y0)^2)=0.02^2)], positive)[]:
last  := select(`<`, [solve(((f(t)-x3)^2+(g(t)-y3)^2)=0.02^2)], 1)[];

If this happens observe what these commands

[solve(((f(t)-x0)^2+(g(t)-y0)^2)=0.02^2)];
[solve(((f(t)-x3)^2+(g(t)-y3)^2)=0.02^2)];

return and try to fix the problem.
Do not hesitate to come back to me if you have any problem.)

@Rouben Rostamian  

Hi, 
Given where the two series were from, I considered (I agree in an implivit way without asking for more details) that the series were pairwised in the following sense.

  • Let T = t1, ..tN  (t being some independent parameter, scalar or not, this doesn't matter)
  • Let F and G two processes which both take t as (unique single to simplified) input.
  • Let A=F~(T) and B=G~(T).
    I say A and B are pairwised series.


This is what all people do when they are concerned by measuring deviations between experimental results and simulation results.

From a purely logic point of view your question is legitimate
(the deviation between A and a permuted A depends on this permutation)
But when it comes to experiment-simulation comparisons I beieve your question is out of context (no offence intended).
 

@Otttimor 

In my case the model nor the data are supposed to be perfect,
One recognizes classicaly 2 different causes for simulation to experiment discrepancy:

  1. A model error (or model bias), voluntary (one voluntary simplify the reality for numerical purposes ;a simple example is a2D axisymmetric model instead of a 3D one) or not (one then speak of "lack of knowledge" to indicate that we just do not know what the true Physics is).
    This error is NOT random even it's treated like this in a bayesian framework.
  2. Measurement errors (bias and/or random errors)

A discrepancy between a simulation and an experiment cna invoke only one type of error or both.
In my previous reply I just used "model error" for it was simpler to build an illustrative example from it.

In your case you say having data with measurement error (which is always the case).
Basically all I did in the worksheet I delivered remains applicable: you have a countable set of measurements (both t and Konc can be erroneous) and a continuous response (the solution of the ODE). When you compute some criterion to estimate how close the simulations are to the experiments, you don't care where the source of the discrepancy is (on the model or on the data).
So, YES, you have done things correctly in your file.

I dont quite understand what is happening in the norm-equation, but it seems like it would be the right equation with my type of situation?
The only question you have to ask yourself is "Is this L2 norm the best to use in my case ?". 
Maybe the Linfinity norm could be better ? 
It's up to you to know.

PARENTHESIS 1
However, when you want to go further, for instance to identify if the discrepancy comes from parametric errors or from  model error, you have to do specific analyses.
For instance, if you are extremely confidentin your model you can claim that the discrepancy originates in parametric errors, that is in measurement errors.
Let us take only one parameter P, and let P its true but unknown value. Let p the measure of P some device gives you and let E the random variable which models the measurement error of this device. When you are going to simulate your system the natural choice for a value to give to parameter P is the measured value p when in fact we should use P instead.
Schematically if F represent the black-box model F(P) is replaced by F(p)=F((p-P)+P) ~ F(P)+(p-P)F'(P): an error on the input (here using p instead of P) propagates to en error on the output of the code.
Which means thet even if the measurement of Konc was error free, the code would not give the same result than the experiment, just because the "input" of the former is p as the "input" of the latter is P (the true value of P).

Now add to this the fact that the expermental measure of Konc is likely to be noisy, and get one more reason to have a discrepancy between the simulation and the experiment.
Some specific approaches have been developped to handle the fact that the inputs of the code can be noisy and thus different from the true values the experiment uses (without knowing precisely their values). Some of these methods can be seen as the search for the best consensus between experimental and numerical results, and generally lead to better agreement between them and thus a smaller discrepancy.

PARENTHESIS 2
There exists a very simple test to detect a possible model error.
Instead of plotting the response of the code and the experimental data on the same figure, plot the difference between latter and the former evaluated at the experimental inputs (this is called "Residue Analysis"). If the resulting cloud doesn't exhibit any particular shape, it's likely your model is error free. If somepattern emerges this may come from a non stationnary error bias (not themost common situation), or from a model eror (the most likely situation).
In your case, the model overpredicts for t > 100, which should make you suspicious of it beyond 100s (some physical phenomenon neglected maybe?)

I hope I didn't drown you in all these thoughts.
Please do not hesitate to contact me if you need clarification or additional help

@ecterrab 

Thank you Edgardo.

@acer 

In this very particular case f := x^3 + y^3 + z^3 - 4*x*y*z is an homogeneous polynomial of the form 

h := (u^3+v^3-4*u*v+1)*lambda^3;
c := coeff(h, x^3);

where lambda could stand for x, y, or z
As lambda is maximal for lambda=+infinity, h will be minimum as along as c < 0.

display(
  inequal(c > 0, u=0..5, v=0..5, color=gray)
  , contourplot(c, u=0..5, v=0..5, contours=[0], grid=[400, 400], color=red, thickness=2)
  , textplot([5/2, 4, typeset(c > 0)], color=blue)
);

The domain where f is minimum is the domain inside the three elliptic cylinders.
f is minimum on the three cross sections of these cylynders located at x=+infinity, or y=+infinity, or z=+infinity

NegativeInside.mw

@acer 

What an impressive work, from the way you use subsindets to your in-text explanations !

The Normalizer feature seems unfortunately poorly documented, and I found nothing about its use un linear algebra.
This is why your answer is so valuable.

I hope to share with you again on this site.

PS:I hadn't thought of this "lurking hidden-zero timebomb can be accidentally introduced" you are talking about. And, YES, I also assumed the W[i].E__C blocks were non singular.

@acer 

Thank you for your comment.

"I don't think that I deleted the Question." : I had notthought that either, thinking that it was rather the OP's doing (?)

About the "encoding" of the matrix
This come from the OP saying that the computational time was large (as a matter of fact I killed the execution before havi,g obtained a solution) and from @Carl Love's answer concerning a general observation of him about using method=pseudo in the inversion of formal matrices.

I often "encode" matrices this way ot obtain a more concise form of the output and to lessen the memeory size and the computational time. 
You are right saying that this approach can give false results, in particular if you replace, for instance
f(a, b, c) by A,
g(a, b, c) by B
and h(f(a, b, c), g(a, b, c) by C

Simplifications become hidden and it could be that a singular matrix appears as regular.
When I proceed this way I always check a few basics facts (for instance the singular matrix remains singular, as I did here) and I have some idea of the expected outcome (something I have not here).

So you are perfectly right in saying that I "should be careful about using such an approach in general".

About Normalizer := evala:  I guess it's a feature of more recent versions than my old (but still good) 2015.2?

I have a question concerning the initial worksheet the OP delivered
InitialWorkSheet.mw
As I always work with 1D mode, I immediatly tried to replace some elements of the original matrix KGff using eval.
This failed for some obscure reason until I lprinted the matrix and got this (only element  KGff[1, 1] here):

(1, 1) = Typesetting:-delayDotProduct(1/3000, D__pile*W[1] . E__c, true)
         +
         Typesetting:-delayDotProduct(1/63368, D__pile*W[2] . E__c, true)*sqrt(89)

In fact each terme of this matrix seems to be a dot product of between two vectors U and V, where U is probably the result of a matrix vector product.
(which is in line with your comment for, if E__c is the nul vector, KGff is the null matrix and computing its pseudo inverse makes no sense at all)

What is the meaning of Typesetting:-delayDotProduct here.

If I define such a matrix in 1D mode I simply get this

restart
with(LinearAlgebra):
M := Matrix(2$2, (i, j) -> A[i+j].E):
               
lprint(M);
Matrix(2, 2, {(1, 1) = A[1] . E, (1, 2) = A[2] . E, (2, 1) = A[2] . E, (2, 2) = A[3] . E}, datatype = anything, storage = rectangular, order = Fortran_order, shape = [])

Thanks again for your comment



Where does this image come from?
What is its format?
Is this image an export of an inline plot into a jpeg/png/pdf format?
Does the image contain a curve or a surface?
Does the image contain auxiliary informations such as text, labels, gridlines and so on?
Can you provide an example of such an image?
 

@dharr Yes, it is, if epsilon=0

I spent a lot of time trying to understand your remark "The OP doesn't actually want the Fourier transform of FTIé.
Actually I did it. I wrote in my answer "the expression ... cannot be the Fourier transform of FTI" instead of "FTI cannot be the Fourier transform of the expression ...", or "the expression ... cannot be the Inverse Fourier transform of FTI".

Sorry for this confusion

@FDS 

The fact that 

F   := cat(currentdir(), "/OriginalFile.txt"):
cmd := cat("sed -i bk  's/ //g' ", F):
ssystem(cmd):

is either a syntax error, but I don't see it, either a Maple problem, for I can run it from a terminal window.

@tomleslie 

What I called a steady state, that is the state obtained when neither S, E, I nor R no longer evolve.
Set the derivatives to 0 to obtain this steady state: what you get looks like the OP"s model.

But it would be easier to verify this if @Pemudahijrah01  decided to upload his worksheet, which he doesn't seem to care to do. 

@Pemudahijrah01 

Cann you clarify your model ?
It seems to be the steady state limit of a SEIR model, is that it ?
In this case can you specify the meaning of all your parameters?
Once done it should be obvious to find the reproductive number.

Here is a reference you could read
https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology

From this source:

Apply the last formula and that's it

Can ou please download your worksheet by using the green up-arrow  in the menubar?
Once this is done, explain more precisely what you want

First 61 62 63 64 65 66 67 Last Page 63 of 154