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/

Risposte (1)

William Rose
William Rose il 6 Gen 2025
Modificato: William Rose il 6 Gen 2025
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 Commenti

Sorry may be my question was not clear.
My question is which machine learning algorithm best fit for this application?
I can't take complex data as target. The algorithm is throughing error as Y must not be complex. My input is resistance, capacitance and inductance component values with frequency range. I need to predict its magnitude and phase. This is a regression problem right. So I started with regression learner. But the problem with this learner is it predict magnitude separate and phase separate. Then I tried neural fit bayesian regression is giving good prediction plot for resistance of 220 components of 10001 data points. But when I come to capacitance the prediction vs actual plot (regression plot) is bad.
So I am checking with u which algorithm best fit for this non-linear, multioutput and output interdependent data set.
@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.
@William Rose I am not using any code, as I am relying on the Neural Net Fitting and Regression Learner toolboxes from MATLAB. My main task involves preparing the input and target data to feed into these toolboxes.
Let me explain my task from the beginning for clarity.
I have measured S-parameters for various electronic components. From these S-parameters, I calculate the magnitude and phase responses to determine parasitic values such as Equivalent Series Inductance (ESL) and Equivalent Series Resistance (ESR) — important for analyzing components from an EMC perspective.
However, I am currently in the initial stage of my work. At this stage, I am not focusing on calculating parasitic values. Instead, my first objective is to train a machine learning model to predict the magnitude and phase responses of components based on measured data. Since I cannot practically measure the S-parameters of every possible component, I aim to use my existing dataset to train a model that can generalize and predict responses for unmeasured component values.
Since this is a regression problem, I initially started with the Regression Learner toolbox in MATLAB. However, I found that it is not suitable for predicting both magnitude and phase simultaneously. It requires separate models for magnitude and phase, which limits the model's ability to capture any interdependencies between the two outputs — a key factor for improving prediction accuracy in my application.
After realizing this limitation, I shifted to the Neural Net Fitting toolbox. It worked reasonably well for predicting the responses of resistors but performed poorly when applied to capacitors.
@William Rose: Please lets fix a meeting and discuss.
Let me now when you are available.
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.

Accedi per commentare.

Richiesto:

il 6 Gen 2025

Commentato:

il 10 Gen 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by