I’m currently working on designing and simulating lightweight aircraft systems.
I will make a thread to explain each blocks and their functions.
Like & share and tag government bodies
figure
subplot(1,2,1)
scatter(YTest,YPred,50,'filled'); hold on
ref =linspace(min(YTest),max(YTest),100);
plot(ref,ref,'r--','LineWidth',2)
title('Neural Net')
xlabel('Actual'); ylabel('Predicted'); grid on
subplot(1,2,2)
scatter(YTest,YPredLM,50,'filled')
Add your label
Let's build a Neural network from scratch
Let's use Neural Network to predict Fuel consumption of a vehicle engine.
Let's use these input parameters
Engine rpm, vehicle speed, temperature, throttle, air intake rate, vehicle mass, tyre pressure, road slope.
Output: fuel rate
mdl = fitlm(XTrain,YTrain);
YPredLM = predict(mdl,XTest);
RMSE_LM = sqrt(mean((YTest-YPredLM).^2));
There's a need to visualize the neural net Vs Linear regression model
Partitioning of data in ML algorithm.
Before fitting any ML model, ask yourself:
“How do I know my model will work on new data?”
This is exactly why MATLAB has cvpartition() command
Think of your dataset as 100 students.
If you teach all 100 students and then test the same 100
mdl = fitlm(Xtrain,Ytrain);
We then perform a real test
Ypred = predict(mdl, Xtest);
This is data the model has never seen before, the performance here is what actually matters.
Without cvpartition(), you might get 99% accuracy and you'll think you've built a real model