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

📄 rankncg_linear_train.html

📁 RankNGG 算法实现. 含有dll文件。源码为matlab
💻 HTML
字号:
<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
      <!--
This HTML is auto-generated from an M-file.
To make changes, update the M-file and republish this document.
      -->
      <title>RankNCG_linear_train</title>
      <meta name="generator" content="MATLAB 7.2">
      <meta name="date" content="2006-09-28">
      <meta name="m-file" content="script_RankNCG_linear_train"><style>

body {
  background-color: white;
  margin:10px;
}

h1 {
  color: #990000; 
  font-size: x-large;
}

h2 {
  color: #990000;
  font-size: medium;
}

/* Make the text shrink to fit narrow windows, but not stretch too far in 
wide windows.  On Gecko-based browsers, the shrink-to-fit doesn't work. */ 
p,h1,h2,div.content div {
  /* for MATLAB's browser */
  width: 600px;
  /* for Mozilla, but the "width" tag overrides it anyway */
  max-width: 600px;
  /* for IE */
  width:expression(document.body.clientWidth > 620 ? "600px": "auto" );
}

pre.codeinput {
  background: #EEEEEE;
  padding: 10px;
}
@media print {
  pre.codeinput {word-wrap:break-word; width:100%;}
} 

span.keyword {color: #0000FF}
span.comment {color: #228B22}
span.string {color: #A020F0}
span.untermstring {color: #B20000}
span.syscmd {color: #B28C00}

pre.codeoutput {
  color: #666666;
  padding: 10px;
}

pre.error {
  color: red;
}

p.footer {
  text-align: right;
  font-size: xx-small;
  font-weight: lighter;
  font-style: italic;
  color: gray;
}

  </style></head>
   <body>
      <div class="content">
         <h1>RankNCG_linear_train</h1>
         <introduction>
            <p>Trains a linear ranking function using nonlinear conjugate gradient.</p>
         </introduction>
         <h2>Contents</h2>
         <div>
            <ul>
               <li><a href="#1">Syntax</a></li>
               <li><a href="#2">Description</a></li>
               <li><a href="#6">Input</a></li>
               <li><a href="#14">Ouput</a></li>
               <li><a href="#16">Signature</a></li>
               <li><a href="#18">See also</a></li>
            </ul>
         </div>
         <h2>Syntax<a name="1"></a></h2><pre>[w,time_taken]=RankNCG_linear_train(data,CG_tolerance,lambda,method,epsil,verbose,plot_enable)</pre><h2>Description<a name="2"></a></h2>
         <p>The exct version scales as <img src="equations/script_RankNCG_linear_train_eq966.png" align="middle">.</p>
         <p>The approximate version scales as <img src="equations/script_RankNCG_linear_train_eq622.png" align="middle">.</p>
         <p>CG_tolerance and lambda can be chosen by cross-validation.</p>
         <h2>Input<a name="6"></a></h2>
         <div>
            <ul>
               <li>data ... structure containing the data regarding the ranking task at hand [See convert_data_to_ranking_format.m]</li>
               <li>CG_tolerance ... tolerance for the conjugate gradient procedure [Set to 1e-3 to 1e-6]</li>
               <li>lambda ... regularization parameter.</li>
               <li>method ... if 'direct' uses the exact gradient, if 'approx' uses the approximate gradient</li>
               <li>epsil ... the accuracy parameter for the fast approximate computation of erfc functions  [Set to 1e-3 to 1e-6]</li>
               <li>verbose ... if 1 comments are displayed. Set to 0 when timing the program</li>
               <li>plot_enable ... if 1 plots the learning curve</li>
            </ul>
         </div>
         <p>Basic information---</p>
         <div>
            <ul>
               <li>data.N ... number of data points</li>
               <li>data.d ... data dimensionality</li>
               <li>data.S ... number of classes</li>
               <li>data.m ... number of inputs in each class</li>
            </ul>
         </div>
         <p>Actual data---</p>
         <div>
            <ul>
               <li>data.labels ... vector of class labels</li>
               <li>data.X ... cell array where each cell contains the data belonging to one class</li>
               <li>data.index ... index of the data belonging to one class</li>
               <li>data.X_raw ... d x N original data matrix</li>
               <li>data.y_raw ... 1 x N vector of the class labels</li>
            </ul>
         </div>
         <p>Preference graph---</p>
         <div>
            <ul>
               <li>data.graph_type ... graph type</li>
               <li>data.C ... number of edges in the preference graph</li>
               <li>data.G ... data.C x 2 matrix encoding the preference relations. The class in the second column is preferred over that in the
                  first column.
               </li>
               <li>data.num_of_pairs ... total number of pairwise preference realtions</li>
            </ul>
         </div>
         <h2>Ouput<a name="14"></a></h2>
         <div>
            <ul>
               <li> w ... d x 1 learnt weight vector</li>
               <li> time_taken ... in seconds</li>
            </ul>
         </div>
         <h2>Signature<a name="16"></a></h2>
         <div>
            <ul>
               <li><b>Author:</b> Vikas Chandrakant Raykar
               </li>
               <li><b>E-Mail:</b> <a href="mailto:vikas@cs.umd.edu">vikas@cs.umd.edu</a> Date: September 27, 2006
               </li>
            </ul>
         </div>
         <h2>See also<a name="18"></a></h2>
         <p><a href="convert_data_to_ranking_format.html">convert_data_to_ranking_format</a>, <a href="non_linear_conjugate_gradient.html">non_linear_conjugate_gradient</a></p>
         <p class="footer"><br>
            Published with wg_publish; V1.0<br></p>
      </div>
      <!--
##### SOURCE BEGIN #####
%% RankNCG_linear_train
% Trains a linear ranking function using nonlinear conjugate gradient.
%% Syntax
%  [w,time_taken]=RankNCG_linear_train(data,CG_tolerance,lambda,method,epsil,verbose,plot_enable)
%% Description
%%
% The exct version scales as <img src="equations/script_RankNCG_linear_train_eq966.png" align="middle">.
%%
% The approximate version scales as <img src="equations/script_RankNCG_linear_train_eq622.png" align="middle">.
%%
% CG_tolerance and lambda can be chosen by cross-validation.
%%
%% Input
%%
%%
% * data ... structure containing the data regarding the ranking task at hand [See convert_data_to_ranking_format.m]
% * CG_tolerance ... tolerance for the conjugate gradient procedure [Set to 1e-3 to 1e-6]
% * lambda ... regularization parameter.
% * method ... if 'direct' uses the exact gradient, if 'approx' uses the approximate gradient
% * epsil ... the accuracy parameter for the fast approximate computation of erfc functions  [Set to 1e-3 to 1e-6]
% * verbose ... if 1 comments are displayed. Set to 0 when timing the program
% * plot_enable ... if 1 plots the learning curve
%%
% Basic informationREPLACE_WITH_DASH_DASH-
%%
%%
% * data.N ... number of data points
% * data.d ... data dimensionality
% * data.S ... number of classes
% * data.m ... number of inputs in each class
%%
% Actual dataREPLACE_WITH_DASH_DASH-
%%
%%
% * data.labels ... vector of class labels
% * data.X ... cell array where each cell contains the data belonging to one class
% * data.index ... index of the data belonging to one class
% * data.X_raw ... d x N original data matrix
% * data.y_raw ... 1 x N vector of the class labels
%%
% Preference graphREPLACE_WITH_DASH_DASH-
%%
%%
% * data.graph_type ... graph type
% * data.C ... number of edges in the preference graph
% * data.G ... data.C x 2 matrix encoding the preference relations. The class in the second column is preferred over that in the first column.
% * data.num_of_pairs ... total number of pairwise preference realtions
%%
%% Ouput
%%
%%
% *  w ... d x 1 learnt weight vector
% *  time_taken ... in seconds
%%
%% Signature
%%
%%
% * *Author:* Vikas Chandrakant Raykar
% * *E-Mail:* vikas@cs.umd.edu
% Date: September 27, 2006
%%
%% See also
%%
% convert_data_to_ranking_format,  non_linear_conjugate_gradient
%%
%%
%

##### SOURCE END #####
-->
   </body>
</html>

⌨️ 快捷键说明

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