1. EX.NO:6 DESIGN AND SIMULATE REAL TIME PROBLEM USING
DATE: FUZZY BASED SYSTEM
AIM:
To design and simulate real time problem using fuzzy based system.
PROBLEM DESCRIPTION:
Gas Mileage Prediction illustrates the prediction of fuel consumption for
automobiles, using data from previously recorded observations.Automobile MPG (miles
per gallon) prediction is a typical nonlinear regression problem, in which several
attributes of an automobile's profile information are used to predict another continuous
attribute.
PROCEDURE:
1. The six input attributes are no. of cylinders, displacement,horsepower, weight,
acceleration, and model year.
2. The output variable to be predicted is the fuel consumption in MPG.
3. The data set is obtained from the original data file 'auto-gas.dat'.
4. The function |exhsrch| performs an exhaustive search within the available
inputs to select the set of inputs that most influence the fuel consumption.
5. ANFIS returns the error with respect to training data and checking data
6. The input-output surface shown above is a nonlinear and monotonic surface
and illustrates how the ANFIS model will respond to varying values of'weight'
and 'year'.
PROGRAM:
[data, input_name] = loadgas;
trn_data = data(1:2:end, :);
chk_data = data(2:2:end, :);
exhsrch(1, trn_data, chk_data, input_name);
input_index = exhsrch(2, trn_data, chk_data, input_name);
exhsrch(3, trn_data, chk_data, input_name);
close all;
new_trn_data = trn_data(:, [input_index, size(trn_data,2)]);
new_chk_data = chk_data(:, [input_index, size(chk_data,2)]);
in_fismat = genfis1(new_trn_data, 2, 'gbellmf');
[trn_out_fismat trn_error step_size chk_out_fismat chk_error] = ...
anfis(new_trn_data, in_fismat, [100 nan 0.01 0.5 1.5], [0,0,0,0], new_chk_data,
1);
[a, b] = min(chk_error);