RSS
热门关键字:  数据挖掘  人工智能  数据仓库  搜索引擎  数据挖掘导论
当前位置 :| 首页>人工智能>神经网络>

Conditional Random Field (CRF) Toolbox for Matlab

来源: 作者:unkonwn 时间:2004-12-10 点击:

Conditional Random Field (CRF) Toolbox for Matlab

Written by Kevin Murphy, 2004.
Updated by Mark Schmidt, December 2005.

This toolbox supports inference and learning for CRFs, with the following topologies: chains, 2D lattices, arbitrary graphs. It assumes all potentials are pairwise. Inference is done using belief propagation (my BPMRF2 and BPlattice code). For chains and trees, this is exact, otherwise it is approximate.
See also 1D CRFs in Java

数据挖掘研究院

数据挖掘研究院

Download

Click here Unziping creates a directory called CRFall, which contains several subdirectories.

This code contains netlab 3.3 bundled in. 数据挖掘研究院

Installation

Assuming you unzip it to C:/CRFall...
>> addpath(genpath(′C:/CRFall′))
>> testCRF
This will run various simple 1D and 2D demos. Look at the source code for more details...

Documentation

The code is modelled on netlab.

Represenation

Several kinds of CRF structures are supported:
  • crfchain for 1D chains (in CRF1D)
  • crf2Ddemo for 2D lattices (in CRF2D)
  • crf for general graphs (in CRF)

All models have potentials defined as follows:

  • For local evidence for node i in state qi:
      phi{i}(qi) = exp[ sum_d w{i}(d,qi) f{i}(d) ]
    数据挖掘实验室
    where f{i}(d) is the d′th element of the feature vector for node i and w{i}(d, qi) is the weight matrix representing the compatibility of feature d to state qi.

    数据挖掘研究院

  • For hidden edge e conecting nodes i and j in states qi, qj:
       psi{e}(qi,qj) is a table.
    数据挖掘研究院
    Note that the current implementation does not support data-dependent edge potnetials. Also, the edge potentials take O(K^2) space to represent, although they can be tied.

Inference

Currently we support the following inference engines
  • BP (belief propagation), which is exact for chains and trees
  • Exact-2D (by converting the 2D lattice to an HMM - this only works for small grids)
  • Graph cuts: to be added.

Learning

Currently we support the following max likelihood parameter learning engines
  • Various first order gradient methods : see crf2Ddemo for a list. You can extend this by modifying the switch statement in crf2DdemoTrain.
  • Pseudo-likelihood: to be added.
The gradient methods use the following pieces:
  • crfpack to extract all the parameters from the CRF structure into an initial parameter vector.
  • crfunpack to store the final parameter vector inside the CRF structure.
  • Some function to compute the gradient such as crfErrAndGrad. The ′net′ crf structure contains the name of the inference engine internally.
  • Some gradient based optimizer (eg fminsearch).

Further reading

上一篇:神经网络工具
下一篇:BP网络VC代码
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
匿名?