Why doesnt the neural network just give me the fitting function as an output?

9 ビュー (過去 30 日間)
Ali Almakhmari
Ali Almakhmari 2023 年 8 月 24 日
回答済み: Udit06 2023 年 8 月 29 日
When I am training a neural network to fit a bunch of data. Why doesn't the Neural Network just give me the function (equation(s)) it developed by the fitting at the very end? Is there a way to do this?
ANN=fitnet([50],'trainbr');
ANN=train(ANN,Input,Output);
  2 件のコメント
Walter Roberson
Walter Roberson 2023 年 8 月 24 日
The function-like representation of the trained network would involve four 50 x 50 matrices. Most people would not find that readable.
Ali Almakhmari
Ali Almakhmari 2023 年 8 月 24 日
Why is it four though? Thats very interesting, I still want to see it. How do you think I can get access to them?

サインインしてコメントする。

回答 (1 件)

Udit06
Udit06 2023 年 8 月 29 日
Hi Ali,
I understand that you want to obtain a function-like representation of the neural network that you have trained. To get a function-like representation of the trained neural network, you can try accessing the weight assigned to each neuron after training and the activation function of each layer of the neural network. You can use the “getwb” function (https://www.mathworks.com/help/deeplearning/ref/getwb.html) to access the weight of each neuron. To access the activation function of each neuron you can use the following.
activationFunction = ANN.layers{layer_num}.transferFcn;
You can refer to the following MathWorks documentation link to understand more about “transferFcn” property: https://www.mathworks.com/help/deeplearning/ug/neural-network-subobject-properties.html#bss4hk6-99
Thus, combining the information obtained, you can get a better understanding of how a function-like representation of a trained neural network looks like.
I hope this helps.

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by