Matlab中Latent SVM model参数含义

发布时间:2014-10-22 19:51:33编辑 分享查询网我要评论
本篇文章主要介绍了"Matlab中Latent SVM model参数含义",主要涉及到Matlab中Latent SVM model参数含义方面的内容,对于Matlab中Latent SVM model参数含义感兴趣的同学可以参考一下。

原文: Matlab中mat文件model参数含义 模型文件是按照Latent SVM模型保存语法保存参数的,利用了查表的思想,具体细节需要参考原始论文。这样保存的目的好像是计算方便。 1.model简单节点内容  model.class= 'bottle' model.year= 2011 model.note= 15-50-36 等  2.  model有以下关键节点 filters:[1x42 struct]   rules: {1x81 cell} symbols:[1x81 struct]   start: 2  里面的数字仅为了说明使用  model.symbols(i)=        type: 'T'     filter: 3  T:terminal,对应一个filter,并且给出其index。N->non-terminal,非filter,而是一个deformation model  model.filters{i}=               w: [7x11x31 double]     blocklabel: 1      symmetric: 'M'           size: [7 11]           flip: 0         symbol: 1  包含the filter weights和 blocklabel,symmetric有两种情况M和N,M表明有一个垂直镜像部分;N表示没有。如果symmetric == 'M'那么将会有两个filters有相同的blocklabel。 flip表明w需要filp组成filter。 symbol记录model.symbol的标记,例如model.symbols{8}.filter = 3,那么model.filter{3}.bymbol = 8;  model.rules是模型存取的关键,model.rules和symbol大小相同,每个model.rules中都有一个symbol。  LHS: lefthand side  RHS: righthand side  The cellmodel.rules{i} holds an array struct that lists the rules for which I acts asthe left-hand side symbol.  So,model.rules{4}(1) and model.rules{4}(2) are the first two productions forsymbol 4 in some imaginary grammar.  Thefield model.start holds the distinguished start symbol for the grammar.  Let's use that symbol as an example.   model.rules{model.start}(1)=       type: 'S'        lhs: 2        rhs: [1 11 15 19 23 27 31]     offset: { w: -3.394  blocklabel: 2 }     anchor: {[0 0 0]  [12 0 1] [4 5 1]  [13 8 1]  [0 0 1] [16 0 1]  [0 5 1]}  Here isthe first rule with model.start on the LHS. In the case of a 6 component mixture model, model.rules {model.start} isa struct array of 6 elements.  The fieldlhs is simply a convenience field indicating what the production's LHS is.  The field rhs holds the symbols that appearon the production's right-hand side.  Thefield type is 'S' if this is a structural rule or 'D' if this is a deformationrule.  Now I'll split the description intotwo cases.  case 1:structural rule  The fieldoffset holds the offset value and its blocklabel (these will be shared for mirroredcomponents).  The anchor field holds theparameters of the "structure function" that defines how each of thesymbols in the rhs is placed relative to a placement of the lhs symbol.  The format is [dx dy ds], where 2^ds is thescale change.  So ds = 1 implies that therhs symbol lives attwice resolution of the lhs symbol.  Thevalues of dx, dy are HOG cell displacements at the rhs's native scale.  Note that dx and dy are displacements, sothey are 1 less than the anchor values that were defined in the old model.  The first symbol on the rhs has anchor = [0 00], because this symbol is a terminal for the root filter.  case 2:deformation rule  Let'slook at the second symbol on the rhs in the rule above.  model.rules{11}=      type: 'D'      lhs: 11      rhs: 10      def: {              w: [0.0209 -0.0015 0.0155 0.0010]     blocklabel: 8           flip: 0      symmetric: 'M'      }      offset: { w: 0  blocklabel: 7 }  Deformationrules don't have an anchor field, but do have a def field.  The def field describes the deformation modelfor this rule, and so it includes the coefficients and the blocklabel.  The def.symmetric field can be 'M' if thereis a vertically mirrored deformation rule or 'N' if there is no symmetry constraint.  In the case of 'M', flipindicates how to write features and read models (just like features.flip).  There's an implicit assumption in the codethat deformation rules only have one symbol on the right-hand side (though itneed not be a terminal).  def.w用于求取deformation model,也就是XML中的Penalty节点内容

上一篇:Java 07