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

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

?? som_demo2.m

?? it is matlab code , som(slef organizing map) tool for matlab
?? M
字號:
%SOM_DEMO2 Basic usage of the SOM Toolbox.% Contributed to SOM Toolbox 2.0, February 11th, 2000 by Juha Vesanto% http://www.cis.hut.fi/projects/somtoolbox/% Version 1.0beta juuso 071197 % Version 2.0beta juuso 070200clf reset;figure(gcf)echo onclc%    ==========================================================%    SOM_DEMO2 - BASIC USAGE OF SOM TOOLBOX%    ==========================================================%    som_data_struct    - Create a data struct.%    som_read_data      - Read data from file.%%    som_normalize      - Normalize data.%    som_denormalize    - Denormalize data.%%    som_make           - Initialize and train the map. %%    som_show           - Visualize map.%    som_show_add       - Add markers on som_show visualization.%    som_grid           - Visualization with free coordinates.%%    som_autolabel      - Give labels to map.%    som_hits           - Calculate hit histogram for the map.%    BASIC USAGE OF THE SOM TOOLBOX%    The basic usage of the SOM Toolbox proceeds like this: %      1. construct data set%      2. normalize it%      3. train the map%      4. visualize map%      5. analyse results%    The four first items are - if default options are used - very%    simple operations, each executable with a single command.  For%    the last, several different kinds of functions are provided in%    the Toolbox, but as the needs of analysis vary, a general default%    function or procedure does not exist. pause % Strike any key to construct data...clc%    STEP 1: CONSTRUCT DATA%    ======================%    The SOM Toolbox has a special struct, called data struct, which%    is used to group information regarding the data set in one%    place.%    Here, a data struct is created using function SOM_DATA_STRUCT.%    First argument is the data matrix itself, then is the name %    given to the data set, and the names of the components%    (variables) in the data matrix.D = rand(1000,3); % 1000 samples from unit cubesData = som_data_struct(D,'name','unit cube','comp_names',{'x','y','z'});			%    Another option is to read the data directly from an ASCII file.%    Here, the IRIS data set is loaded from a file (please make sure%    the file can be found from the current path):try,   sDiris = som_read_data('iris.data');catch  echo off  warning('File ''iris.data'' not found. Using simulated data instead.')    D = randn(50,4);   D(:,1) = D(:,1)+5;     D(:,2) = D(:,2)+3.5;   D(:,3) = D(:,3)/2+1.5; D(:,4) = D(:,4)/2+0.3;  D(find(D(:)<=0)) = 0.01;     D2 = randn(100,4); D2(:,2) = sort(D2(:,2));  D2(:,1) = D2(:,1)+6.5; D2(:,2) = D2(:,2)+2.8;   D2(:,3) = D2(:,3)+5;   D2(:,4) = D2(:,4)/2+1.5;  D2(find(D2(:)<=0)) = 0.01;     sDiris = som_data_struct([D; D2],'name','iris (simulated)',...			  'comp_names',{'SepalL','SepalW','PetalL','PetalW'});  sDiris = som_label(sDiris,'add',[1:50]','Setosa');  sDiris = som_label(sDiris,'add',[51:100]','Versicolor');  sDiris = som_label(sDiris,'add',[101:150]','Virginica');    echo onend%     Here are the histograms and scatter plots of the four variables.echo off k=1;for i=1:4,   for j=1:4,     if i==j,       subplot(4,4,k);       hist(sDiris.data(:,i)); title(sDiris.comp_names{i})    elseif i<j,       subplot(4,4,k);       plot(sDiris.data(:,i),sDiris.data(:,j),'k.')      xlabel(sDiris.comp_names{i})      ylabel(sDiris.comp_names{j})    end    k=k+1;  endendecho on%     Actually, as you saw in SOM_DEMO1, most SOM Toolbox functions%     can also handle plain data matrices, but then one is without the%     convenience offered by component names, labels and%     denormalization operations.pause % Strike any key to normalize the data...clc%    STEP 2: DATA NORMALIZATION%    ==========================%    Since SOM algorithm is based on Euclidian distances, the scale of%    the variables is very important in determining what the map will%    be like. If the range of values of some variable is much bigger%    than of the other variables, that variable will probably dominate%    the map organization completely. %    For this reason, the components of the data set are usually%    normalized, for example so that each component has unit%    variance. This can be done with function SOM_NORMALIZE:sDiris = som_normalize(sDiris,'var');%    The function has also other normalization methods.%    However, interpreting the values may be harder when they have%    been normalized. Therefore, the normalization operations can be%    reversed with function SOM_DENORMALIZE:x = sDiris.data(1,:)orig_x = som_denormalize(x,sDiris)pause % Strike any key to to train the map...clc%    STEP 3: MAP TRAINING%    ====================%    The function SOM_MAKE is used to train the SOM. By default, it%    first determines the map size, then initializes the map using%    linear initialization, and finally uses batch algorithm to train%    the map.  Function SOM_DEMO1 has a more detailed description of%    the training process.sMap = som_make(sDiris);pause % Strike any key to continues...%    The IRIS data set also has labels associated with the data%    samples. Actually, the data set consists of 50 samples of three%    species of Iris-flowers (a total of 150 samples) such that the%    measurements are width and height of sepal and petal leaves. The%    label associated with each sample is the species information:%    'Setosa', 'Versicolor' or 'Virginica'.%    Now, the map can be labelled with these labels. The best%    matching unit of each sample is found from the map, and the%    species label is given to the map unit. Function SOM_AUTOLABEL %    can be used to do this: sMap = som_autolabel(sMap,sDiris,'vote');pause % Strike any key to visualize the map...clc%    STEP 4: VISUALIZING THE SELF-ORGANIZING MAP: SOM_SHOW%    =====================================================%    The basic visualization of the SOM is done with function SOM_SHOW.colormap(1-gray)som_show(sMap,'norm','d')%    Notice that the names of the components are included as the%    titles of the subplots. Notice also that the variable values%    have been denormalized to the original range and scale.%    The component planes ('PetalL', 'PetalW', 'SepalL' and 'SepalW')%    show what kind of values the prototype vectors of the map units%    have. The value is indicated with color, and the colorbar on the%    right shows what the colors mean.%    The 'U-matrix' shows distances between neighboring units and thus%    visualizes the cluster structure of the map. Note that the%    U-matrix visualization has much more hexagons that the%    component planes. This is because distances *between* map units%    are shown, and not only the distance values *at* the map units. %    High values on the U-matrix mean large distance between%    neighboring map units, and thus indicate cluster%    borders. Clusters are typically uniform areas of low%    values. Refer to colorbar to see which colors mean high%    values. In the IRIS map, there appear to be two clusters.pause % Strike any key to continue...%    The subplots are linked together through similar position. In%    each axis, a particular map unit is always in the same place. For%    example:h=zeros(sMap.topol.msize); h(1,2) = 1;som_show_add('hit',h(:),'markercolor','r','markersize',0.5,'subplot','all')%    the red marker is on top of the same unit on each axis. pause % Strike any key to continue...clfclc%    STEP 4: VISUALIZING THE SELF-ORGANIZING MAP: SOM_SHOW_ADD%    =========================================================%    The SOM_SHOW_ADD function can be used to add markers, labels and%    trajectories on top of SOM_SHOW created figures. The function%    SOM_SHOW_CLEAR can be used to clear them away.%    Here, the U-matrix is shown on the left, and an empty grid%    named 'Labels' is shown on the right.som_show(sMap,'umat','all','empty','Labels')pause % Strike any key to add labels...%    Here, the labels added to the map with SOM_AUTOLABEL function%    are shown on the empty grid.som_show_add('label',sMap,'Textsize',8,'TextColor','r','Subplot',2)pause % Strike any key to add hits...%    An important tool in data analysis using SOM are so called hit%    histograms. They are formed by taking a data set, finding the BMU%    of each data sample from the map, and increasing a counter in a%    map unit each time it is the BMU. The hit histogram shows the%    distribution of the data set on the map.%    Here, the hit histogram for the whole data set is calculated%    and visualized on the U-matrix.h = som_hits(sMap,sDiris);som_show_add('hit',h,'MarkerColor','w','Subplot',1)pause % Strike any key to continue...%    Multiple hit histograms can be shown simultaniously. Here, three%    hit histograms corresponding to the three species of Iris%    flowers is calculated and shown. %    First, the old hit histogram is removed.som_show_clear('hit',1)%    Then, the histograms are calculated. The first 50 samples in%    the data set are of the 'Setosa' species, the next 50 samples%    of the 'Versicolor' species and the last 50 samples of the%    'Virginica' species. h1 = som_hits(sMap,sDiris.data(1:50,:));h2 = som_hits(sMap,sDiris.data(51:100,:));h3 = som_hits(sMap,sDiris.data(101:150,:));som_show_add('hit',[h1, h2, h3],'MarkerColor',[1 0 0; 0 1 0; 0 0 1],'Subplot',1)%    Red color is for 'Setosa', green for 'Versicolor' and blue for%    'Virginica'. One can see that the three species are pretty well%    separated, although 'Versicolor' and 'Virginica' are slightly%    mixed up.pause % Strike any key to continue...clfclc%    STEP 4: VISUALIZING THE SELF-ORGANIZING MAP: SOM_GRID%    =====================================================%    There's also another visualization function: SOM_GRID.  This%    allows visualization of the SOM in freely specified coordinates,%    for example the input space (of course, only upto 3D space). This%    function has quite a lot of options, and is pretty flexible.%    Basically, the SOM_GRID visualizes the SOM network: each unit is%    shown with a marker and connected to its neighbors with lines.%    The user has control over: %     - the coordinate of each unit (2D or 3D)%     - the marker type, color and size of each unit%     - the linetype, color and width of the connecting lines%    There are also some other options.pause % Strike any key to see some visualizations...%    Here are four visualizations made with SOM_GRID: %     - The map grid in the output space.subplot(2,2,1)som_grid(sMap,'Linecolor','k')view(0,-90), title('Map grid')%     - A surface plot of distance matrix: both color and %       z-coordinate indicate average distance to neighboring %       map units. This is closely related to the U-matrix.subplot(2,2,2)Co=som_unit_coords(sMap); U=som_umat(sMap); U=U(1:2:size(U,1),1:2:size(U,2));som_grid(sMap,'Coord',[Co, U(:)],'Surf',U(:),'Marker','none');view(-80,45), axis tight, title('Distance matrix')%     - The map grid in the output space. Three first components%       determine the 3D-coordinates of the map unit, and the size%       of the marker is determined by the fourth component.%       Note that the values have been denormalized.subplot(2,2,3)M = som_denormalize(sMap.codebook,sMap);som_grid(sMap,'Coord',M(:,1:3),'MarkerSize',M(:,4)*2)view(-80,45), axis tight, title('Prototypes')%     - Map grid as above, but the original data has been plotted%       also: coordinates show the values of three first components%       and color indicates the species of each sample.  Fourth%       component is not shown.subplot(2,2,4)som_grid(sMap,'Coord',M(:,1:3),'MarkerSize',M(:,4)*2)hold onD = som_denormalize(sDiris.data,sDiris); plot3(D(1:50,1),D(1:50,2),D(1:50,3),'r.',...      D(51:100,1),D(51:100,2),D(51:100,3),'g.',...      D(101:150,1),D(101:150,2),D(101:150,3),'b.')view(-72,64), axis tight, title('Prototypes and data')pause % Strike any key to continue...%    STEP 5: ANALYSIS OF RESULTS%    ===========================%    The purpose of this step highly depends on the purpose of the%    whole data analysis: is it segmentation, modeling, novelty%    detection, classification, or something else? For this reason, %    there is not a single general-purpose analysis function, but %    a number of individual functions which may, or may not, prove %    useful in any specific case.%    Visualization is of course part of the analysis of%    results. Examination of labels and hit histograms is another%    part. Yet another is validation of the quality of the SOM (see%    the use of SOM_QUALITY in SOM_DEMO1).[qe,te] = som_quality(sMap,sDiris)%    People have contributed a number of functions to the Toolbox%    which can be used for the analysis. These include functions for %    vector projection, clustering, pdf-estimation, modeling,%    classification, etc. However, ultimately the use of these%    tools is up to you.%    More about visualization is presented in SOM_DEMO3.%    More about data analysis is presented in SOM_DEMO4.echo offwarning on

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美美女网站色| 欧美午夜精品理论片a级按摩| 欧美三级三级三级爽爽爽| 欧美成人官网二区| 亚洲国产成人精品视频| 成人精品视频一区| www日韩大片| 奇米四色…亚洲| 欧洲视频一区二区| 国产精品久久久久久户外露出| 久久精品国产99国产精品| 欧美性色黄大片| 亚洲欧美日韩综合aⅴ视频| 国产精品69毛片高清亚洲| 日韩免费电影一区| 日韩国产精品久久| 欧美做爰猛烈大尺度电影无法无天| 中文字幕成人网| 国产乱码精品一区二区三区av | 国产黄色精品网站| 欧美一区二区三区公司| 亚洲高清在线精品| 欧美性受xxxx| 亚洲自拍偷拍av| 99v久久综合狠狠综合久久| 国产欧美一区二区精品忘忧草| 国产一区二区影院| 亚洲精品在线观看视频| 久久超碰97中文字幕| 日韩精品中午字幕| 免费视频最近日韩| 欧美一级黄色录像| 日本亚洲视频在线| 日韩一区二区影院| 蜜桃av一区二区| 欧美夫妻性生活| 日韩成人av影视| 欧美一区二区三区在线观看视频| 丝袜美腿成人在线| 欧美一区二区免费| 九九热在线视频观看这里只有精品| 欧美一级黄色片| 狠狠色综合日日| 国产欧美日韩视频在线观看| 国产不卡在线视频| 国产精品三级电影| 97久久人人超碰| 亚洲乱码国产乱码精品精小说 | 欧美一区二区精品| 日本欧美大码aⅴ在线播放| 日韩一区二区三区在线观看| 美女视频一区在线观看| 亚洲精品在线网站| 成人小视频免费在线观看| 国产精品午夜免费| 色综合天天综合网天天狠天天 | 国产精品久久久久久久久动漫| 99久久99久久免费精品蜜臀| 一二三区精品福利视频| 欧美日韩国产在线播放网站| 六月丁香婷婷久久| 国产婷婷色一区二区三区在线| 成人91在线观看| 亚洲精品日日夜夜| 欧美日韩在线精品一区二区三区激情| 午夜视黄欧洲亚洲| 精品国产一区二区三区忘忧草 | 国产精品一二三四区| 一区二区中文字幕在线| 欧洲亚洲国产日韩| 麻豆精品视频在线| 国产欧美在线观看一区| 色综合久久久久久久久久久| 午夜视频久久久久久| 久久伊人蜜桃av一区二区| 91在线播放网址| 日韩高清不卡一区二区| 国产亚洲欧美日韩在线一区| 91在线高清观看| 日本不卡视频在线| 国产精品卡一卡二| 欧美日韩国产首页在线观看| 韩国女主播一区| 伊人色综合久久天天| 日韩一区二区三区视频在线观看| 懂色av中文字幕一区二区三区| 一区二区三区资源| 久久一日本道色综合| 色婷婷综合久久久中文字幕| 蜜桃视频在线观看一区二区| 国产精品国产馆在线真实露脸| 欧美浪妇xxxx高跟鞋交| 国产经典欧美精品| 午夜精品视频一区| 国产精品拍天天在线| 91.麻豆视频| 成人h动漫精品| 日韩和欧美的一区| 日韩美女视频一区二区| 精品国产乱码久久久久久老虎| 97精品久久久午夜一区二区三区| 久久成人久久爱| 亚洲一卡二卡三卡四卡无卡久久 | 日韩亚洲欧美一区二区三区| 不卡一区在线观看| 玖玖九九国产精品| 洋洋av久久久久久久一区| 久久久一区二区| 欧美人xxxx| fc2成人免费人成在线观看播放| 日本aⅴ免费视频一区二区三区| 亚洲视频在线观看三级| 久久久99免费| 欧美一区二区三区四区视频| 日本高清不卡一区| 国产乱子伦视频一区二区三区 | 亚洲欧美二区三区| 久久亚洲精品国产精品紫薇| 欧美一区三区四区| 欧洲精品在线观看| 99久久精品情趣| 国产suv精品一区二区三区| 蜜臀av一区二区| 天天综合色天天综合色h| 亚洲色图制服丝袜| 国产欧美精品一区aⅴ影院| 欧美一级高清大全免费观看| 欧美亚洲丝袜传媒另类| 成人h版在线观看| 国产成人小视频| 久久精品国产澳门| 蜜臀久久久久久久| 香蕉av福利精品导航 | 精品国产乱码久久久久久夜甘婷婷| 欧美亚日韩国产aⅴ精品中极品| 不卡高清视频专区| 成人国产电影网| 国产成人aaa| 国产综合色在线| 久久66热re国产| 精品制服美女丁香| 久久精品国产成人一区二区三区| 日本人妖一区二区| 奇米777欧美一区二区| 天堂成人免费av电影一区| 亚洲国产精品一区二区尤物区| 一区二区三区四区在线播放| 亚洲人精品一区| 亚洲黄色小视频| 一区二区三区在线视频免费| 亚洲乱码中文字幕综合| 亚洲男人电影天堂| 亚洲美女一区二区三区| 亚洲黄色小说网站| 一区二区不卡在线播放 | 国产精品久久久爽爽爽麻豆色哟哟| 国产亚洲综合性久久久影院| 久久久91精品国产一区二区三区| 久久精品亚洲精品国产欧美| 久久精品视频免费观看| 国产日韩精品一区二区浪潮av| 国产婷婷色一区二区三区| 国产偷国产偷精品高清尤物| 国产精品美女久久久久久久久久久| 国产女主播一区| 日韩美女精品在线| 亚洲一二三四区| 日韩中文字幕1| 久久黄色级2电影| 国产在线麻豆精品观看| 国产成人免费视频网站高清观看视频| 高清不卡一区二区| 91免费观看在线| 欧美视频一区二区三区在线观看| 欧美日韩国产成人在线免费| 欧美一卡2卡三卡4卡5免费| 精品久久人人做人人爰| 国产日产欧美一区| 亚洲婷婷国产精品电影人久久| 亚洲美女免费在线| 日韩国产欧美在线观看| 国产一区二区三区香蕉| 99久久婷婷国产综合精品电影| 91国模大尺度私拍在线视频| 欧美精品一二三| 精品国产乱码久久久久久图片| 中国色在线观看另类| 亚洲午夜久久久久久久久久久| 美女视频一区二区三区| 国产不卡在线播放| 欧美性感一类影片在线播放| 3atv一区二区三区| 久久久久久久久免费| 亚洲精选在线视频| 青青草国产精品97视觉盛宴| 国产精一品亚洲二区在线视频| 91小视频免费观看| 欧美成人精品1314www| 成人免费一区二区三区在线观看| 午夜av区久久|