gas mileage prediction using anfis model
DESCRIPTION
Using ANFIS model to create a prediction model for the gas mileage problem using a small dataset.TRANSCRIPT
![Page 1: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/1.jpg)
Gas Mileage Prediction
Using ANFIS model
![Page 2: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/2.jpg)
Automobile MPG (miles per gallon) prediction
• A typical nonlinear regression problem.– several attributes of an automobile's profile information are used
to predict another continuous attribute, the fuel consumption in MPG.
• Objective of this problem:– find the important input variables which contribute more in the
prediction of MPG.– training an adaptive network with fewer data points than
required.
• Two problems:– Data Scarcity.– Input Space Partitioning.
![Page 3: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/3.jpg)
Training DataInput Attributes Output
Car Name Number of Cylinders Displacement Horsepower Weight Acceleration Year MPG
Chevrolet Chevelle Malibu
8 307 130 3504 12 70 18
Plymouth Duster 6 198 95 2833 15.5 70 22
Fiat 128 4 90 75 2108 15.5 74 24
Oldsmobile Cutlass
Supreme8 260 110 4060 19 77 17
Toyota Tercel 4 89 62 2050 17.3 81 37.7
Honda Accord 4 107 75 2205 14.5 82 36
Ford Ranger 4 120 79 2625 18.6 82 28
![Page 4: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/4.jpg)
Data Scarcity problem• For single-input data-scarcity problem, ideally 10
data points are required.• Therefore, for 6-input model, 106 data points
required!!!• The auto-mpg data set of the UCI repository
contains only 392 data instances.• To solve this problem of data scarcity, the entire
dataset is partitioned into two sets :– A training set used for model building, and – A testing set used for model validation.
![Page 5: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/5.jpg)
Input Space Partitioning
• Grid partitioning on a problem of 6 inputs leads to atleast 26 = 64 rules.– (6+1) x 4 = 448 linear parameters required for
first-order Sugeno model.• To solve this, we can:
– select certain inputs with more predictive power than other inputs, or
– choose tree or scatter partitioning technique .
![Page 6: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/6.jpg)
Finding Attributes with More Predictive Power
• The training and checking set are used to select the set of inputs that most influence the fuel consumption.
• We build an ANFIS model for each combination– Train it for one epoch.– Report the performance achieved.
• First, we plot the ANFIS model for each of the input variable.
![Page 7: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/7.jpg)
Effect of every Variable on Fuel Consumption
Blue line – Root Mean Square Errors for Training dataGreen line – Root Mean Square Errors for Testing data
![Page 8: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/8.jpg)
Effect of every Variable on Fuel Consumption
• The plot clearly shows that Weight is the most influential variable.
• But, training and testing RMSE are comparable, hence there is no “overfitting”.
• So, we can move to more than one variable combination for the model.
![Page 9: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/9.jpg)
Effect of Two input variable combinations on fuel consumption
![Page 10: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/10.jpg)
Effect of Two input variable combinations on fuel consumption
• “Weight” and “Displacement” are individually the most influential attributes.
• But, in fig., combination of “Weight” and “Year” has least RMSE value.
• Hence for 2 input model, “Weight” and “Year” attributes used.
• For other combination, onset of overfitting observed.
![Page 11: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/11.jpg)
Effect of 3 input variable combinations on fuel consumption
![Page 12: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/12.jpg)
Effect of 3 input variable combinations on fuel consumption
• 'Weight', 'Year', and 'Acceleration' are selected as the best combination of three input variables.
• However, the minimal training (and checking) error do not reduce significantly from that of the best 2-input model.
• Therefore we will stick to the two-input ANFIS.
![Page 13: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/13.jpg)
Training the ANFIS Model
• For the inputs fixed, 100 epochs of training done.
• ANFIS gives plot of RMSE for training and checking data.
![Page 14: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/14.jpg)
Training the ANFIS Model
![Page 15: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/15.jpg)
• The minimal checking error occurs at about epoch 45.
• Checking error curve goes up after 50 epochs.
• This indicates overfitting.• So, ideally the number of training epochs
must be kept to 45-50 epochs to prevent overtraining.
![Page 16: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/16.jpg)
Analyzing the ANFIS Model
Unavailability of training data
Surface of plot of inputs to output
![Page 17: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/17.jpg)
Limitations and Cautions
• The elevated corners indicates the fact that that the heavier an automobile is, the more gas-efficient it will be.
• This is counter-intuitive.
• It happens due to lack of data.
![Page 18: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/18.jpg)
Unavailability of data
Fig. shows lack of data in the upper right corner.
![Page 19: Gas Mileage Prediction Using ANFIS model](https://reader038.vdocuments.us/reader038/viewer/2022100516/551e76354a795993108b4aaf/html5/thumbnails/19.jpg)
ANFIS vs Linear Regression
• The same problem when solved using Linear regression gives a root mean square error of 3.444.
• Using ANFIS, RMSE is 2.978.• This indicates that ANFIS model
outperforms the linear regression model by giving the most appropriate and better results.