Class/Object

org.mitre.jcarafe.crf

Crf

Related Docs: object Crf | package crf

Permalink

abstract class Crf extends Trainable[AbstractInstance] with PotentialScoring with Serializable

Top abstract class representing the core elements and functionality of a sequence-structured Conditional Random Field. A Crf object is created after feature extraction has occurred.

Linear Supertypes
PotentialScoring, Trainable[AbstractInstance], Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Crf
  2. PotentialScoring
  3. Trainable
  4. Serializable
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Crf(nls: Int, nfs: Int)

    Permalink
  2. new Crf(nls: Int, nfs: Int, segSize: Int)

    Permalink
  3. new Crf(nls: Int, nfs: Int, gPrior: Double)

    Permalink
  4. new Crf(lambdas: Array[Double], nls: Int, nfs: Int, segSize: Int, gPrior: Double, nNfs: Int, nGates: Int)

    Permalink

    lambdas

    Parameter (lambda) vector

    nls

    Number of labels/states

    nfs

    Number of features

    segSize

    The size of segments. Sizes greater than 1 indicate the model is a semi-CRF

    gPrior

    The Gaussian prior variance used as a regularizer

    nNfs

    Number of neural gate input features (for NeuralCrf)

    nGates

    Number of neural gates per label (for NeuralCrf)

Type Members

  1. type Matrix = Array[Array[Double]]

    Permalink
    Definition Classes
    PotentialScoring
  2. type Tensor = Array[Matrix]

    Permalink
    Definition Classes
    PotentialScoring

Abstract Value Members

  1. abstract def forwardPass(iseq: IndexedSeq[AbstractInstance]): Double

    Permalink
    Attributes
    protected
  2. abstract def getGradient(seqAccessor: AccessSeq[AbstractInstance]): Option[Double]

    Permalink
    Definition Classes
    CrfTrainable
  3. abstract def train(seqAccessor: AccessSeq[AbstractInstance], maxIters: Int, mi: Option[(CoreModel, Int) ⇒ Unit]): CoreModel

    Permalink
    Definition Classes
    CrfTrainable

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var adjustible: Boolean

    Permalink

    When set to true, the Crf will allow the state-space to be dynamically sized - i.e.

    When set to true, the Crf will allow the state-space to be dynamically sized - i.e. the number of states is dependent on each sequence

  5. var alpha: Matrix

    Permalink

    Alpha values.

    Alpha values. Need values for each segment length for each label (in general, Semi-CRF case)

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def assign(v1: Array[Double], f: (Double) ⇒ Double): Unit

    Permalink
    Attributes
    protected
  8. def assign1(v1: Array[Double], v2: Array[Double], f: (Double, Double) ⇒ Double): Unit

    Permalink
    Attributes
    protected
  9. def backwardPass(iseq: Seq[AbstractInstance]): Unit

    Permalink
    Attributes
    protected
  10. var beta: Matrix

    Permalink

    Beta values.

    Beta values. Need values for each segment length for each label (in general, Semi-CRF case)

  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def computeScores(inst_features: Array[Array[Feature]], takeExp: Boolean): Unit

    Permalink
    Attributes
    protected
  13. final def computeScores(ri: Matrix, mi: Tensor, inst_features: Array[Array[Feature]], takeExp: Boolean, nls: Int, lambdas: Array[Double]): Unit

    Permalink
    Definition Classes
    PotentialScoring
  14. val curA: Array[Double]

    Permalink

    Current alpha values used for Forward-Backward computation

  15. var curNls: Int

    Permalink
  16. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. val gPrior: Double

    Permalink

    The Gaussian prior variance used as a regularizer

  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def getCoreModel(): CoreModel

    Permalink
    Definition Classes
    CrfTrainable
  22. def getLambdas: Array[Double]

    Permalink
    Definition Classes
    Trainable
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. def initialize(): Unit

    Permalink
    Definition Classes
    CrfTrainable
  25. val invSigSqr: Double

    Permalink

    The value of the inverse square of the Gaussian prior

  26. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  27. val lambdas: Array[Double]

    Permalink

    Parameter (lambda) vector

    Parameter (lambda) vector

    Definition Classes
    CrfTrainable
  28. final def matrixMult(mat: Matrix, vec: Array[Double], rvec: Array[Double], alpha: Double, beta: Double, trans: Boolean): Unit

    Permalink
    Definition Classes
    PotentialScoring
  29. val mi: Tensor

    Permalink

    For each segment size, the mi matrix holds transition scores for adjacent labels

  30. val nGates: Int

    Permalink

    Number of neural gates per label (for NeuralCrf)

  31. val nNfs: Int

    Permalink

    Number of neural gate input features (for NeuralCrf)

  32. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  33. val newA: Array[Double]

    Permalink

    Alpha values at the next position used for Forward-Backward computation

  34. val nfs: Int

    Permalink

    Number of features

  35. val nls: Int

    Permalink

    Number of labels/states

  36. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. val numParams: Int

    Permalink
    Definition Classes
    CrfTrainable
  39. def reset(all: Boolean, slen: Int): Unit

    Permalink
    Attributes
    protected
  40. def resetParameters(): Unit

    Permalink
  41. val ri: Matrix

    Permalink

    For each segment size (general case) the ri matrix holds state scores for each label

  42. var scale: Array[Double]

    Permalink

    An array of scaling coefficients to avoid underflow without having to do computations in log space.

    An array of scaling coefficients to avoid underflow without having to do computations in log space. See Manning and Schutze Chapter 9 for details (there in the context of HMMs)

  43. val segSize: Int

    Permalink

    The size of segments.

    The size of segments. Sizes greater than 1 indicate the model is a semi-CRF

  44. final def setMatrix(m: Matrix, v: Double = 0.0): Unit

    Permalink
    Definition Classes
    PotentialScoring
  45. final def setTensor(t: Tensor, v: Double = 0.0): Unit

    Permalink
    Definition Classes
    PotentialScoring
  46. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  47. val tmp: Array[Double]

    Permalink
  48. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  49. def train(seqAccessor: AccessSeq[AbstractInstance]): CoreModel

    Permalink
  50. def vecSum(vec: Array[Double]): Double

    Permalink
    Attributes
    protected
  51. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from PotentialScoring

Inherited from Trainable[AbstractInstance]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped