Tsitsopoulos asked . 2021-07-27

Struggling to Improve Neural Network Performance

I am working on creating a function fitting neural network with the neural network toolbox but I haven't had much success getting it to work correctly. I have an input matrix with two features. I currently use fitnet (I've tried cascadeforwardnet/feedforwardnet without much difference) and have two hidden layers, each with 10 neurons. I've been using `trainbr` because it has given me better results than `trainlm`. I'm trying to normalize or standardize the data but haven't had much success. I know that fitnet uses mapminmax by default and I've seen Greg Heath's suggestion that I use zscore to standardize first. The problem is, every time I've used the zscore standardization I haven't gotten very good neural network results. My output needs to be completely positive after de-standardization yet I still get negative values. Because of this, I have used log10 to normalize the data, therefore keeping all of the values positive.
In order to see prediction error, I have found the maximum percent error at any individual output point. I cannot get error lower than 40%, and there are multiple other points with decently high error.
 
Is there anything else that I can do, whether it be normalization/standardization or network reconfiguration to improve my network performance?
EDIT:
 
I'm not sure if this is of any help but the regression plot shows that the R = 0.99984 so it seems very accurate.

neural network , deep learning

Expert Answer

Neeta Dsouza answered . 2024-12-20 21:21:56

>Why is it that MSE is the best measure of error and >the way I was calculating error is no good? Is it >because the toolbox focuses on minimizing that error >so me trying to minimize a different type of error >is of little help?
That's part of it. The other part is does percent error really make sense in a regression problem?
>I made the changes you suggested and run 10 trials >where each trial has some multiple of 3 hidden neurons >where the multiple is between 3 and 30. Each of these >trials builds & simulates 10 ANNs, each with a random >split of training/testing/validation data. I made it >so that the training data must be between 60% and 93% >of the total input data. I calculate the r squared and >output it to the below 10x10 matrix. Now that I have >this, I see that many of the values in the matrices >are above 0.99. How am I supposed to differentiate >between these values?
Ideally, N is sufficiently large so that the tst results are accurate and UNBIASED while the val results are relatively accurate and only SLIGHTLY BIASED.
Typically, the training goal I use is to minimize H subject to the constraint Rtrnsq > 0.99. I first obtain four 10x10 Rsq matrices for trn, val, tst and all. Next, these are reduced to four 4x10 matrices containing the min, median, mean and maximum Rsq vs H. Finally, the four rows of the four matrices are plotted.
As far as choosing one design, I would favor a net with Rsq > 0.99 at the smallest value of H.
>> Also, is there a way to bound my output so it is always positive? A negative output is impossible in the real world yet the neural net has several points that are output as negative.
>Using a bounded output transfer function will keep the output within bounds. Either TANSIG or LOGSIG will work. The scaling to your data will be done automatically.
>>Whether I use logsig or tansig as the hidden layer transfer function doesn't make a difference in output. I always end up having some values in the NN output be negative, which is impossible for what I'm trying to do. The only thing that's ever guaranteed my output be positive was using log10(target) before training/ simulating and then 10^target afterwards.
You have misinterpreted what I said. Change the OUTPUT TRANSFER FUNCTION!


Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.