How to get relationship between input variables and output through ANN

23 次查看(过去 30 天)
How to get the relationship between input variables and output through ANN. I have 4 input variables and 1 output. From the regression plot, I am getting only a relationship between target output and predicted output. I can't use Minitab RSM beacuse I have predefined dataset (which does not follow DOE sequence). please help

回答(1 个)

Ayush Anand
Ayush Anand 2023-12-14
Hi Sunita,
You can analyse the relationship between the inputs and output in an Artificial Neural Network by varying inputs and seeing how it affects the output, also known as feature importance Here are a few methods that implement the same:
  1. Sensitivity Analysis: You can perturb each input variable within a certain range while keeping others constant and observe the changes in the output.
  2. Partial Dependence Plots: Partial dependence plots (PDP) can show the marginal effect one or two features have on the predicted outcome of a machine learning model.
  3. Surrogate Models: You can train a surrogate model that is more interpretable, such as a decision tree or linear regression, to approximate the ANN's behavior, and then use it to understand the relationship between the inputs and output better.
Here's an example of how you might perform sensitivity analysis in MATLAB:
% Load the ANN model
net = ...; % Your trained network
% Define a range for the input variable you want to analyze
inputVarRange = linspace(minValue, maxValue, numPoints);
% a matrix to store outputs
outputValues = zeros(numPoints, 1);
% Loop over the range of input values
for i = 1:numPoints
% Create an input vector with the current value of the variable
inputVector = [inputVarRange(i); constantValue2; constantValue3; constantValue4];
% Get the ANN's output for this input vector
outputValues(i) =predict(net, inputVector);
end
% Plot the relationship between the variable and the output
plot(inputVarRange, outputValues);
xlabel('Input Variable');
ylabel('Output');
title('Sensitivity Analysis for Input Variable');
You can read through the following for more information:
  1. https://www.mathworks.com/help/stats/feature-selection.html (Official documentation on how to perform a general feature selection process in MATLAB based on their importance)
  2. https://www.mathworks.com/matlabcentral/answers/299646-how-to-obtain-the-relative-importance-of-each-input-variable-for-a-neural-network (MATLAB Answer on how to obtain relative importance of each input variable for a neural network)
  3. https://www.mathworks.com/help/stats/regressiontree.plotpartialdependence.html (How to plot Partial Dependence plots in MATLAB)
I hope this helps!

标签

Community Treasure Hunt

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

Start Hunting!

Translated by