trait Model[Datum] extends SerializableLogging
A Model represents a class for turning weight vectors into epic.framework.Inferences. It's main job is to hook up with a epic.framework.ModelObjective and mediate computation of ExpectedCounts and conversion to the objective that's needed for optimization.
- Datum
the kind of
- Self Type
- Model[Datum]
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- Model
- SerializableLogging
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- abstract type ExpectedCounts >: Null <: framework.ExpectedCounts[ExpectedCounts]
- abstract type Inference <: framework.Inference[Datum] { ... /* 2 definitions in type refinement */ }
- abstract type Marginal <: framework.Marginal
- abstract type Scorer
Abstract Value Members
- abstract def accumulateCounts(inf: Inference, s: Scorer, d: Datum, m: Marginal, accum: ExpectedCounts, scale: Double): Unit
- abstract def emptyCounts: ExpectedCounts
- abstract def expectedCountsToObjective(ecounts: ExpectedCounts): (Double, DenseVector[Double])
-
abstract
def
featureIndex: Index[Feature]
Models have features, and this defines the mapping from indices in the weight vector to features.
- abstract def inferenceFromWeights(weights: DenseVector[Double]): Inference
- abstract def initialValueForFeature(f: Feature): Double
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def accumulateCounts(inf: Inference, d: Datum, accum: ExpectedCounts, scale: Double): Unit
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cacheFeatureWeights(weights: DenseVector[Double], suffix: String = ""): Unit
Caches the weights using the cache broker.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def expectedCounts(inf: Inference, d: Datum, scale: Double = 1.0): ExpectedCounts
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
logger: LazyLogger
- Attributes
- protected
- Definition Classes
- SerializableLogging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- def numFeatures: Int
-
def
readCachedFeatureWeights(suffix: String = ""): Option[DenseVector[Double]]
just saves feature weights to disk as a serialized counter.
just saves feature weights to disk as a serialized counter. The file is prefix.ser.gz
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
weightsCacheName: String
- Attributes
- protected