亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gasdemo.m

?? 模糊控制工具箱,很好用的,有相應的說明文件,希望對大家有用!
?? M
字號:
%% Gas Mileage Prediction
% This demo illustrates the prediction of fuel consumption (miles per
% gallon) for automobiles, using data from previously recorded
% observations.
%
% Copyright 1994-2005 The MathWorks, Inc.
% $Revision: 1.9.2.3.2.1 $

%% Introduction
% 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,
% the fuel consumption in MPG. The training data is available in the UCI 
% (Univ. of California at Irvine) Machine Learning Repository
% (http://www.ics.uci.edu/~mlearn/MLRepository.html). It contains data
% collected from automobiles of various makes and models.
%
% The table shown above is several observations or samples from the MPG
% data set. The six input attributes are no. of cylinders, displacement,
% horsepower, weight, acceleration, and model year. The output variable to
% be predicted is the fuel consumption in MPG. (The automobile's
% manufacturers and models in the first column of the table are not used
% for prediction).

%% Partitioning data
% The data set is obtained from the original data file 'auto-gas.dat'. The
% dataset is then partitioned into a training set (odd-indexed samples) and
% a checking set (even-indexed samples).

[data, input_name] = loadgas;
trn_data = data(1:2:end, :);
chk_data = data(2:2:end, :);

%% Input Selection
% The function |exhsrch| performs an exhaustive search within the available
% inputs to select the set of inputs that most influence the fuel
% consumption. The first parameter to the function specifies the number of
% input  combinations to be tried during the search. Essentially, |exhsrch|
% builds an ANFIS model for each combination and trains it for one epoch
% and reports the performance achieved. In the following example, |exhsrch|
% is used to determine the one most influential input attribute in
% predicting the  output. 
% 

exhsrch(1, trn_data, chk_data, input_name);

%%
% *Figure 1:* Every input variable's influence on fuel consumption 

%%
% The left-most input variable in Figure 1 has the least error or in other
% words the most relevance with respect to the output.
%
% The plot and results from the function clearly indicate that the input 
% attribute 'Weight' is the most influential. The training and checking 
% errors are comparable, which implies that there is no overfitting. This 
% means we can push a little further and explore if we can select more than 
% one input attribute to build the ANFIS model.
% 
% Intuitively, we can simply select 'Weight' and 'Disp' directly since
% they have the least errors as shown in the plot. However, this will not 
% necessarily be the optimal combination of two inputs that result in the 
% minimal training error. To verify this, we can use |exhsrch| to search for 
% the optimal combination of 2 input attributes.

input_index = exhsrch(2, trn_data, chk_data, input_name);

%%
% *Figure 2:* All two input variable combinations and their influence
% on fuel consumption

%%
% The results from |exhsrch| indicate that 'Weight' and 'Year' form the
% optimal combination of two input attributes. The training and checking 
% errors are getting distinguished, indicating the outset of overfitting.
% It may not be prudent to use more than two inputs for building the ANFIS
% model. We can test this premise to verify it's validity.

exhsrch(3, trn_data, chk_data, input_name);

%%
% *Figure 3:* All three input variable combinations and their influence
% on fuel consumption

%% 
% The plot demonstrates the result of selecting three inputs, in
% which 'Weight', 'Year', and 'Acceler' 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, which
% indicates that the newly added attribute 'Acceler' does not improve the
% prediction much. For better generalization, we always prefer a model
% with a simple structure. Therefore we will stick to the two-input ANFIS
% for further exploration.
%
% We then extract the selected input attributes from the original training
% and checking datasets.

close all;
new_trn_data = trn_data(:, [input_index, size(trn_data,2)]);
new_chk_data = chk_data(:, [input_index, size(chk_data,2)]);


%% Training the ANFIS model
% The function |exhsrch| only trains each ANFIS for a single epoch in order
% to be able to quickly find the right inputs. Now that the inputs are
% fixed, we can spend more time on ANFIS training (100 epochs).
%
% The |genfis1| function generates a initial FIS from the training data,
% which is then finetuned by ANFIS to generate the final model.

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);

%%
% ANFIS returns the error with respect to training data and checking data
% in the list of its output parameters. The plot of the errors provides
% useful information about the training process.

[a, b] = min(chk_error);
plot(1:100, trn_error, 'g-', 1:100, chk_error, 'r-', b, a, 'ko');
title('Training (green) and checking (red) error curve');
xlabel('Epoch numbers');
ylabel('RMS errors');

%%
% *Figure 4:* ANFIS training and checking errors

%%
% The plot above shows the error curves for 100 epochs of ANFIS training.
% The green curve gives the training errors and the red curve gives the
% checking errors. The minimal checking error occurs at about epoch 45,
% which is indicated by a circle.  Notice that the checking error curve 
% goes up after 50  epochs, indicating that further training overfits the
% data and produces worse generalization

%% ANFIS vs Linear Regression
% A good exercise at this point would be to check the performance of the
% ANFIS model with a linear regression model.
%
% The ANFIS prediction can be compared against a linear regression model by
% comparing their respective RMSE (Root mean square) values against
% checking data.
%

% Performing Linear Regression
N = size(trn_data,1);
A = [trn_data(:,1:6) ones(N,1)];
B = trn_data(:,7);
coef = A\B; % Solving for regression parameters from training data

Nc = size(chk_data,1);
A_ck = [chk_data(:,1:6) ones(Nc,1)];
B_ck = chk_data(:,7);
lr_rmse = norm(A_ck*coef-B_ck)/sqrt(Nc);
% Printing results
fprintf('\nRMSE against checking data\nANFIS : %1.3f\tLinear Regression : %1.3f\n', a, lr_rmse);

%%
% It can be seen that the ANFIS model outperforms the linear regression
% model.
%
%% Analyzing the ANFIS model
% The variable |chk_out_fismat| represents the snapshot of the ANFIS model
% at the minimal checking error during the training process. The
% input-output surface of the model is shown in the plot below.

chk_out_fismat = setfis(chk_out_fismat, 'input', 1, 'name', 'Weight');
chk_out_fismat = setfis(chk_out_fismat, 'input', 2, 'name', 'Year');
chk_out_fismat = setfis(chk_out_fismat, 'output', 1, 'name', 'MPG');

% Generating the FIS output surface plot
gensurf(chk_out_fismat);

%%
% *Figure 5:* Input-Output surface for trained FIS

%%
% 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'.


%% Limitations and Cautions
% We can see some spurious effects at the far-end corner of the surface.
% The elevated corner says that the heavier an automobile is, the more
% gas-efficient it will be. This is totally counter-intuitive, and it is a
% direct result from lack of data. 

plot(new_trn_data(:,1), new_trn_data(:, 2), 'bo', ...
    new_chk_data(:,1), new_chk_data(:, 2), 'rx');
xlabel('Weight');
ylabel('Year');
title('Training (o) and checking (x) data');

%%
% *Figure 6:* Weight vs Year plot showing lack of data in the upper-right
% corner

%% 
% This plot above shows the data distribution. The lack of training data at
% the upper right corner causes the spurious ANFIS surface mentioned
% earlier. Therefore the prediction by ANFIS should always be interpreted
% with the data distribution in mind.


displayEndOfDemoMessage(mfilename)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品素人视频| 国产激情视频一区二区三区欧美 | 欧美日韩国产大片| 久久先锋资源网| 亚洲妇熟xx妇色黄| 成人免费毛片a| 欧美一区二区三区在线观看 | 欧美大片一区二区| 亚洲免费高清视频在线| 国产福利电影一区二区三区| 欧美日韩亚洲综合在线| 国产精品久久夜| 狠狠色狠狠色综合系列| 欧美另类久久久品| 亚洲免费在线观看| 成人黄色电影在线| 国产片一区二区| 国产一区二区三区精品视频| 日韩视频一区在线观看| 婷婷综合另类小说色区| 色先锋aa成人| 亚洲日本在线视频观看| 成人性生交大片免费看视频在线| 久久先锋影音av| 精品一区二区三区免费毛片爱| 在线播放欧美女士性生活| 亚洲图片一区二区| 欧洲av一区二区嗯嗯嗯啊| 亚洲美女在线国产| 99精品久久免费看蜜臀剧情介绍| 国产欧美日韩不卡| 国产成人亚洲精品青草天美| 精品欧美一区二区三区精品久久| 五月激情六月综合| 欧美一级淫片007| 久久精品国产一区二区| 2019国产精品| 国产成人免费网站| 国产精品乱码一区二三区小蝌蚪| 国产精品一区二区在线观看网站| 久久久久久久久久久电影| 国产精品综合久久| 国产精品天天摸av网| 9人人澡人人爽人人精品| 亚洲欧美国产三级| 91丨九色丨国产丨porny| 亚洲精品高清在线观看| 欧美日韩国产一级| 蜜乳av一区二区三区| 久久精品在线观看| caoporn国产精品| 亚洲在线一区二区三区| 91精品中文字幕一区二区三区| 蜜桃av噜噜一区| 国产女人水真多18毛片18精品视频 | 亚洲综合一区二区精品导航| 欧美理论电影在线| 激情文学综合插| 中文字幕国产精品一区二区| 在线看国产一区二区| 美女脱光内衣内裤视频久久影院| 久久久.com| 欧美色视频在线观看| 精品无人码麻豆乱码1区2区 | 99国内精品久久| 亚洲大片精品永久免费| 久久先锋影音av鲁色资源| av一本久道久久综合久久鬼色| 一区二区三区视频在线看| 日韩欧美在线1卡| 99久精品国产| 久久99国产乱子伦精品免费| 椎名由奈av一区二区三区| 日韩一区和二区| 日本大香伊一区二区三区| 午夜精品成人在线视频| 国产精品色婷婷久久58| 在线播放欧美女士性生活| 99国内精品久久| 国产一区欧美一区| 午夜av区久久| 中文字幕中文字幕在线一区| 欧美一区二区三区小说| 91视频在线看| 国产传媒日韩欧美成人| 香蕉久久一区二区不卡无毒影院| 欧美激情一区在线| 欧美精品一区二区三区视频| 欧美日韩一区二区三区不卡| 成人av免费在线| 国产一区二区精品久久99| 日韩精品国产欧美| 一区二区三区中文在线| 中文字幕乱码一区二区免费| 3751色影院一区二区三区| 在线观看视频欧美| 一本大道av伊人久久综合| 国产成人在线视频网址| 国内精品免费**视频| 日韩电影在线一区二区三区| 亚洲精品视频自拍| 国产精品久久久久aaaa| 久久精品视频免费| 亚洲精品一区二区三区影院 | 在线视频你懂得一区二区三区| 国产一区二区三区不卡在线观看| 美国三级日本三级久久99| 丝袜美腿亚洲一区| 五月婷婷综合网| 亚洲成人免费在线观看| 亚洲综合视频在线观看| 亚洲小少妇裸体bbw| 亚洲制服丝袜一区| 亚洲va欧美va天堂v国产综合| 亚洲综合在线视频| 天天做天天摸天天爽国产一区| 亚洲午夜免费电影| 石原莉奈在线亚洲三区| 青草av.久久免费一区| 久久激五月天综合精品| 激情久久五月天| 国产精品一色哟哟哟| 国产成人欧美日韩在线电影| 成人一级片网址| 99精品热视频| 欧美精品三级日韩久久| 日韩欧美国产精品| 精品久久久久香蕉网| 欧美精品一区二区久久婷婷| 国产日韩精品一区二区三区在线| 国产日产欧产精品推荐色 | 男男gaygay亚洲| 蜜桃一区二区三区在线观看| 国产伦精品一区二区三区视频青涩| 激情小说欧美图片| 不卡在线观看av| 欧美无人高清视频在线观看| 欧美一级专区免费大片| 久久先锋资源网| 自拍偷拍亚洲欧美日韩| 亚洲成av人片在线观看| 手机精品视频在线观看| 亚洲免费观看高清完整版在线 | 精品区一区二区| 欧美日韩国产综合视频在线观看| 91丨九色丨黑人外教| 91日韩在线专区| 欧美日本国产视频| 日韩一区二区不卡| 日本一区二区不卡视频| 性欧美疯狂xxxxbbbb| 极品少妇xxxx精品少妇| 99re成人精品视频| 精品福利一二区| 玉足女爽爽91| 国产精品88888| 欧美少妇一区二区| 欧美国产精品v| 美女网站视频久久| 日本久久电影网| 久久久精品黄色| 天天射综合影视| 不卡的av电影在线观看| 日韩一区二区在线观看| 亚洲精品videosex极品| 极品美女销魂一区二区三区免费| 色国产综合视频| 欧美激情一区二区三区不卡| 蜜臀av一区二区在线免费观看| 色老综合老女人久久久| 国产亲近乱来精品视频| 乱中年女人伦av一区二区| 在线观看免费视频综合| 日韩一区有码在线| 国产成人免费在线| 久久综合成人精品亚洲另类欧美 | 在线观看av一区二区| 中文字幕欧美日本乱码一线二线 | 一区二区三区不卡视频| 顶级嫩模精品视频在线看| 欧美大度的电影原声| 亚洲成a人v欧美综合天堂下载| 91在线高清观看| 国产精品的网站| 国产 欧美在线| 精品成人一区二区三区| 久久国产精品99精品国产| 欧美日韩精品专区| 亚洲一二三四区| 色猫猫国产区一区二在线视频| 国产精品福利av| a亚洲天堂av| 国产精品成人一区二区三区夜夜夜| 国产一区视频导航| 久久久久久久免费视频了| 激情文学综合插| 久久久精品人体av艺术| 国产麻豆精品在线| 国产欧美视频一区二区三区| 国产激情视频一区二区在线观看 |