gas mileage prediction using anfis model

19

Click here to load reader

Upload: karan26121989

Post on 02-Apr-2015

187 views

Category:

Documents


3 download

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

Gas Mileage Prediction

Using ANFIS model

Page 2: Gas Mileage Prediction Using ANFIS model

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

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

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

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

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

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

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

Effect of Two input variable combinations on fuel consumption

Page 10: Gas Mileage Prediction Using ANFIS model

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

Effect of 3 input variable combinations on fuel consumption

Page 12: Gas Mileage Prediction Using ANFIS model

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

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

Training the ANFIS Model

Page 15: Gas Mileage Prediction Using ANFIS model

• 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

Analyzing the ANFIS Model

Unavailability of training data

Surface of plot of inputs to output

Page 17: Gas Mileage Prediction Using ANFIS model

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

Unavailability of data

Fig. shows lack of data in the upper right corner.

Page 19: Gas Mileage Prediction Using ANFIS model

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.