Multioutput Regression models for non-linear data
显示 更早的评论
Resistance or capacitance (with voltage) and its frequency range as input and my target or to be predicted is magnitude and phase. As u now magnitude and phase are interdependent data it needs to be predicted together. Most of the regression algorithm is failing to capture the interdependency between magnitude and phase.
Please can u suggest a algorithm which best fit this application/
回答(1 个)
William Rose
2025-1-6
编辑:William Rose
2025-1-6
0 个投票
It sounds to me like you want to estimate the values of circuit elements (R, L, C, etc) that will fit a fit a particular measured, or target, transfer function or impedance (magnitude and phase). The predicted magnitude and phase are nonlinear functions of R, C, etc., so this is a nonlinear regression problem. The best way to fit magnitude and phase simultaneously is to minimize the sum squared distance on the complex plane between the target transfer function (or impedance) and the theoretical transfer function resulting from the R and C you have chosen.
Example: The target, or measured, magntide and phase are functions of frequency:
and
. You have a circuit design. You want to find the values of R and C that produce a transfer funciton that matches the target magnitude and phase. The theoretical magnitude and phase response for your circuit are
and
. Compute the complex measured response and the complex theoretical response:
and
. Then the error function, which you minimize with a nonlinear regression, is the sum squared difference between
and
over the frequency range of interest:

where * indicates complex conjugate.
5 个评论
Ashritha
2025-1-7
William Rose
2025-1-7
@Ashritha, please share your data and code.
If you have magnitude and phase data which are functions of frequency, and you want to predict the magnitude and the phase by adjusting values for R and C in a model, then the best algorithm to fit this "non-linear, multipoutput and output interdependent data set" is fmincon(), in my opinion. The objective function passed to fmincon() is the one I specified in my previous post. I have completed multiple projects and journal publications with this approach.
You said in your most recenbt comment, "neural fit bayesian regression is giving good prediction plot for resistance of 220 components of 10001 data points". I do not uderstand this statement, in light of your original post. Are you predicting resistance? What does "220 components of 10001 data points" mean? Please share your data and your code. More importantly, please explain the big picture of what you are trying to do. Why are you using regression learner? Why did you try neural fit bayesian regression?
Whn you predict multiple interdependent outputs, you must specify how to weight the different outputs when evaluating the overall results. If the outputs have the same dimensions (for example, if the outputs are all voltages), then you can just add up the errors, and minimize the sum of the errors. When the outputs are magnitude and phase, the units are not the same (magnitude has units of voltage in your case phase is dimensionless), so you have to decide how to balance getting the magnitude right versus getting the phase right. The formula I gave in my previous post is the natural way to do this. You can re-write the formula using only real numbes if you prefer. I had to do this once, since at the time (1980s) I was using a programming language which did not support complex arithmetic.
Ashritha
2025-1-8
Ashritha
2025-1-9
William Rose
2025-1-10
I do not yet understand your problem well enough to provide useful advice. If you would like to discuss further, then send a message by clicking on the envelope icon which appears at upper right when you click the "WR" circle next to my posts.
类别
在 帮助中心 和 File Exchange 中查找有关 Generalized Linear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!