⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpann.htm

📁 this file is leverage algorithm written in matlab as m-file and tested in matlab.so anyone can ue th
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Kohonen and CPANN toolbox</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="HAPedit 3.0">

<link href = "style_structure.css" rel="stylesheet" type="text/css">
<link href = "style_text.css" rel="stylesheet" type="text/css">
<link href = "style_tables.css" rel="stylesheet" type="text/css">

</head>
<body>
<div id="container">
<a name="top"></a>

    <div id="header">
		<iframe src="header.htm" width="740" height="60" scrolling="no" frameborder="0">
  			no i_frames allowed :: change browser
	  	</iframe>
    </div>

    <div id="content">

		<table width="740" border="0" cellpadding="0" cellspacing="0">
  		<tr>
		<td width="150" valign="top">
		
		<iframe src="menu_lateral.htm" width="135" height="268" scrolling="no" frameborder="0">
  			no i_frames allowed :: change browser
	  	</iframe>
		
		</td>

    	<td valign="top">

		  <div align="justify">
		    <div id="tab_duo_contenitor" class="text">
		    <span class="title_page">Counterpropagation ANNs</span>		
		    <BR>
		    <BR>
    
		<div id="tab_duo_text">
		      <div id="tab_space_lateral"><a href="#sub_1" class="lnk_text">Starting the model</a></div>
		      <div id="tab_space_lateral"><a href="#sub_2" class="lnk_text">How to read the results</a></div>
		      <div id="tab_space_lateral"><a href="#sub_3" class="lnk_text">How to plot the results</a></div>
		      <div id="tab_space_lateral"><a href="#sub_4" class="lnk_text">Prediction of new samples</a></div>
		      <div id="tab_space_lateral"><a href="#sub_5" class="lnk_text">Cross validation of Counterpropagation ANNs</a></div>
	   	</div>
    
		<BR><a name="sub_1"></a>
		    <BR>
		    
		<span class="title_paragraph">_ Starting the model</span>
		    <BR>
		    <BR>
		    Once <a href="start.htm#sub_1" class="lnk_text">data</a> have been prepeared and <a href="start.htm#sub_2" class="lnk_text">settings</a> have been defined, you can build a classification model based on CPANNs by typing the following code in the MATLAB command window:
			<BR>
		    <BR>
			
			<div id="tab_duo_text" class="text_math">
				model = model_cpann(X,class,settings);
  	        </div>
			<BR>

		    where X is the <a href="start.htm#sub_1" class="lnk_text">data matrix</a> (with dimension [n x p], n samples, p variables), class is the <a href="start.htm#sub_1" class="lnk_text">class vector</a> [n x 1], and settings is the <a href="start.htm#sub_2" class="lnk_text">setting structure</a>. Depending on the size and epochs used to train the model, MATLAB could take some minutes to calculate it. Anyway, in the MATLAB command window the number of processed epochs will be displayed.<BR>
		    <BR>
			[<a href="#top" class="lnk_text">-> top</a>]
		    <BR>
		    <BR> <a name="sub_2"></a>
		    <BR>
		    
		<span class="title_paragraph">_ How to read the results</span>
		    <BR>
		    <BR>
		    The given output (model) is a structure, with several fields containing all the results.

			<BR><BR>         
			<B>model.net.W</B><BR>
			this field contains the kohonen weights with dimension [size x size x p]

			<BR><BR>         
			<B>model.net.W_out</B><BR>
			this field contains the output weights with dimension [size x size x c], where c is the number of defined classes

			<BR><BR>         
			<B>model.net.settings</B><BR>
			contains the used settings (epochs, size, etc...)

			<BR><BR>         
			<B>model.net.neuron_ass</B><BR>
			contains the class assignation of each neuron [size x size]

			<BR><BR>         
			<B>model.scal</B><BR>
			is a structure containing all the scaling parameters (minimum and maximum values for all the variables)

			<BR>
			<BR>         
			<B>model.res.top_map</B><BR>
			contains the sample positions (coordinates) in the map, with dimensions [n x 2]. The top map coordinates are coded in the following way:
		    <BR>
		    <BR>
			<center><img src="kohonen_top_map.gif" width="393" height="311" border="1"></center>
		    <BR>
			where, for example, the red point represents a generic sample placed in the neuron with coordinates [3,2];

			<BR>
			<BR>         
			<B>model.res.class_calc</B><BR>
			contains the class assignation of each sample [n x 1]

			<BR><BR>         
			<B>model.res.class_param</B><BR>
			is a structure containing some classification results:
			<BR>
			- confusion matrix ('conf_mat') is a matrix displaying  the real classes (rows) and assigned classes (columns). The last column represents not assigned samples.
			<BR>
			- non-error rate ('ner') is the percentage of correclty assigned samples
			<BR>- error rate ('er') is the percentage of not correclty assigned samples
			<BR>
			- percentage of not assigned samples  ('not_ass')
			<BR>
			- precision, specificity and sensitivity of each class 

		    <BR>
		    <BR>
			[<a href="#top" class="lnk_text">-> top</a>]		    
    		<BR>
		    <BR><a name="sub_3"></a>
		    <BR>
		    
		<span class="title_paragraph">_ How to plot the results</span>
		    <BR>
		    <BR>
		    You can open a MATLAB GUI to visualize the results. To do so, type:
			<BR>
		    <BR>
			<div id="tab_duo_text" class="text_math">
				visualize_model(model);
  	        </div>
			<BR>
		    where <a href="#sub_1" class="lnk_text">model</a> is the previously described model structure and class is the <a href="start.htm#sub_1" class="lnk_text">class vector</a> [n x 1]. The follwoing GUI will appear:
			<BR>
		    <BR>
			<center>
              <img src="kohonen_visualize.gif" width="550" height="450">            </center>
			<BR>
		    this plot represent the top map, where samples and variable weights can be displayed. &quot;Display labels&quot; and &quot;Display weights&quot; set the sample labels and variable weights respectivly. 
			Neurons can be coloured from white (weight equal to zero, minimum value) to black (weight equal to 1, maximum  value). &quot;Update&quot; is the button for updating the plot. You can move the map (&quot;up&quot;, &quot;down&quot;, &quot;right&quot; and &quot;left&quot;), while &quot;get neuron weights&quot; opens a new plot diplaying all the weights of a selected neuron and &quot;get neuron labels&quot; opens a new plot with the list of all the sample labels of a selected neuron. <BR>
		    <BR>
			[<a href="#top" class="lnk_text">-> top</a>]
			<BR>
		    <BR><a name="sub_4"></a>
		    <BR>
		    
		<span class="title_paragraph">_ Prediction of new samples</span>
		    <BR>
		    <BR>
		    In order to project new samples in an existing net, type:
			<BR>
		    <BR>
			<div id="tab_duo_text" class="text_math">
				pred = pred_cpann(Xnew,model);
  	        </div>
			<BR>
		    where Xnew is the data matrix of the samples to be predicted (with dimension [n x p], n new samples, p variables)
			and <a href="#sub_1" class="lnk_text">model</a> is the previously described model structure.

			Pred is a structure, containing the following field: 
			<BR><BR>         
			<B>pred.class</B><BR>
			contains the predicted class of the samples [n x 1].

			<BR><BR>         
			<B>pred.top_map</B><BR>
			contains the positions (coordinates) of the predicted samples in the Kohonen Map.

			<BR>
		    <BR>
			[<a href="#top" class="lnk_text">-> top</a>]
			<BR>
		    <BR><a name="sub_5"></a>
		    <BR>
		    
		<span class="title_paragraph">_ Cross validation of Counterpropagation ANNs</span>
		    <BR>
		    <BR>
		    Cross validation is performed with venetian blinds. For example, with 3 cross-validation groups the split of the first group will be [t,0,0,t,0,0,....,t,0,0], while the second one will be [0,t,0,0,t,0,....,0,t,0], and so on.
			In order to cross validate CPANNs, type:
			<BR>
		    <BR>
			<div id="tab_duo_text" class="text_math">
				cv = cv_cpann(X,class,settings,cv_groups)
  	        </div>
			<BR>
		    where X is the <a href="start.htm#sub_1" class="lnk_text">data matrix</a> (with dimension [n x p], n samples, p variables),
			class is the <a href="start.htm#sub_1" class="lnk_text">class vector</a> [n x 1] and cv_groups is the number of cross-validation groups. The output is a structure (cv) with the following fields: 
			<BR><BR>         
			<B>cv.pred_class</B><BR>
			contains the predicted class of the samples [n x 1] during cross validation.			

			<BR><BR>         
			<B>cv.class_param</B><BR>
			is a structure containing some classification results:
			<BR>
			- confusion matrix ('conf_mat') is a matrix displaying displays the real classes (rows) and assigned classes (columns). The last column represents not assigned samples. <BR>
			- non-error rate ('ner') is the percentage of correclty assigned samples <BR>
			- error rate ('er') is the percentage of not correclty assigned samples <BR>
			- percentage of not assigned samples  ('not_ass') <BR>
			- precision, specificity and sensitivity of each class<BR>
		    <BR>
			[<a href="#top" class="lnk_text">-> top</a>]
			<BR>
			<BR>
			<BR>&nbsp;  	     
		 </div>
  
		  </div></td>
  		</tr>
	  </table>

    </div>

    <div id="footer">
		<iframe src="footer.htm" width="700" height="13" scrolling="no" frameborder="0">
  			no i_frames allowed :: change browser
	  	</iframe>
	</div>
</div>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -