Global fitting two functions with shared parameters and variable, which fits two different data sets, respectively
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I recently asked a similar question here:
where I posted my own code for trying to do what the title says, and got an error. Thanks to you guys, I was able to fix the perror. But I don't think I'm doing this right. What I mean by that is that I don't think the code does what I intend to do.
I should not be evaluating the entire 2-norm of SE = GFD - GFF. This is because the first column and the second column of SE has different physical meaning (different digit number) and thus should have competely different TolX.
Here's what I have:
1) Two data sets Adata and Bdata which are physically different properties and has values that are completely different in digits (Adata has 0.01 scale numbers, while Bdata has 0.0001 scale numbers). Meaning, when I fit respective functions to these respective data, I should have different stopping condition (TolX).
2) Two functions for Adata and Bdata, respectively. These two functions share same unknown parameters, though, namely X(1) to X(6). The variable is T.
3) I want to global fit the function so that I can know the fitting parameters X.
I've searched around the Matlab answers but it's not exactly what I want to do. It's either they have a single function that fits two different data sets, they have two functions that fits a single data set, or they have two functions and two data sets with the same scale of number that 2-norm can be used to evaluate (like I did in the link above). None of these are what I want to actually do.
Is there a way I can do this?
0 Kommentare
Akzeptierte Antwort
Torsten
am 2 Feb. 2023
Two data sets Adata and Bdata which are physically different properties and has values that are completely different in digits (Adata has 0.01 scale numbers, while Bdata has 0.0001 scale numbers). Meaning, when I fit respective functions to these respective data, I should have different stopping condition (TolX).
Then multiply the residuals with Adata by a factor of 100 and those of Bdata by a factor of 10000.
3 Kommentare
Torsten
am 2 Feb. 2023
Bearbeitet: Torsten
am 2 Feb. 2023
You are correct.
Scale the residuals, scale the parameters, use other units - any measure that makes both residuals vectors similar in size. By the way: It's not TolX that is concerned here, it's the weight of importance for the two data sets that must somehow be equalized.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!