Neural network fitting tool for multiple experimental data

2 次查看(过去 30 天)
Hi,
I'd like to use neural networks to fit data from multiple experiments, let's say 10 experiments. During each experiment, boundary conditions (my inputs) are constant, but differ from one experiment to another. The output is a time-temperature matrix. I was thinking I could use something like the built-in "body fat percentage" example, but then I should use a matrix for every experiment instead of a column for every person. Is it possible?
Thank you
ps: body fat example
bodyfatInputs - a 13x252 matrix defining thirteen attributes for 252 people.
bodyfatTargets - a 1x252 matrix of associated body fat percentages, to be estimated from the inputs.

回答(1 个)

KALASH
KALASH 2024-5-3
Hi Carlo,
You can try flattening or reshaping each time-temp matrix into a vector so that each experiment’s output can be a column in your target matrix (the body fat percentage which you have given). This assumes the time-temp matrices are same for each experiment.
For eg : if your time-temp matrix for one experiment is 10*10, then you would reshape it into a 100*1 vector.
For preparing your inputs, ensure that each set of boundary conditions is represented as a column in your input matrix and for multiple boundary conditions, each should be a row in the matrix, with each column representing a different experiment.
You can then continue with your construction of the neural network as shown below and train it.
You can refer to the below code snippet:
% Assuming you have 5 boundary conditions and 100 time-temperature data points per experiment
% For 10 experiments
numBoundaryConditions = 5;
numDataPoints = 100; % For a 10x10 time-temperature matrix flattened
numExperiments = 10;
% Randomly generated example data
inputs = rand(numBoundaryConditions, numExperiments); % Replace with your actual data
targets = rand(numDataPoints, numExperiments); % Replace with your actual flattened matrices
% Create a Feedforward Neural Network
net = feedforwardnet([10 10]); % Example architecture, adjust as needed
For more information on neural nets refer this link:
I hope this helps!
Regards,
Kalash

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by