Extracting the mathematical equation from the Neural Network

조회 수: 10 (최근 30일)
Aditya Gujaria
Aditya Gujaria 2020년 10월 3일
댓글: Ameer Hamza 2020년 10월 3일
I am trying to fit a curve using neural network. Is there any way to extract the polynomial/general(not necessarily polynomial) equation from the trained Neural Network ?
Edit 1: I am trying to find the general equation because I need the values at partial derivatives also. So my approach was to extract the equation and then calculate the derivatives. Any other methods are most welcome.!!!

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 10월 3일
Why use a neural network if you want a polynomial fit. Simply use polyfit(): https://www.mathworks.com/help/matlab/ref/polyfit.html. The neural network cannot be reduced to a polynomial
  댓글 수: 2
Aditya Gujaria
Aditya Gujaria 2020년 10월 3일
In my case, the exact linear mapping is not exactly a polynomial but can contain trignometric as well as expo/log terms(which I agree, can be though converted to polynomial to some extent using taylor's series). Moreover, I am unsure of the maximum degree of the resulting polynomial(if it is a ploynomial). Therefore my approach is to train the data using neural networks, which can automatically deduce the nearest highest degree ploynomial (or any other general function) and then using some way extract the equation.
Ameer Hamza
Ameer Hamza 2020년 10월 3일
Neural networks also use nonlinear transfer functions, so they also cannot be converted to a polynomial. You may try to fit a polynomial, starting from degree 1 and gradually increasing the degree until you get a desired level of accuracy.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by