Class

mimir.models

SimpleWekaModel

Related Doc: package models

Permalink

class SimpleWekaModel extends Model with NeedsReconnectToDatabase with SourcedFeedback

Annotations
@SerialVersionUID()
Linear Supertypes
SourcedFeedback, SourcedFeedbackT[String], NeedsReconnectToDatabase, Model, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SimpleWekaModel
  2. SourcedFeedback
  3. SourcedFeedbackT
  4. NeedsReconnectToDatabase
  5. Model
  6. Serializable
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SimpleWekaModel(name: String, colName: String, query: Operator)

    Permalink

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. def argTypes(idx: Int): Seq[Type]

    Permalink

    The list of expected arg types (may be TAny)

    The list of expected arg types (may be TAny)

    Definition Classes
    SimpleWekaModelModel
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. var attributeMeta: ArrayList[Attribute]

    Permalink
  7. def bestGuess(idx: Int, args: Seq[PrimitiveValue], hints: Seq[PrimitiveValue]): PrimitiveValue

    Permalink

    Generate a best guess for a variable represented by this model.

    Generate a best guess for a variable represented by this model.

    idx

    The index of the variable family to generate a best guess for

    args

    The skolem identifier for the specific variable to generate a best guess for

    returns

    A primitive value representing the best guess value.

    Definition Classes
    SimpleWekaModelModel
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val colIdx: Int

    Permalink
  10. def confidence(idx: Int, args: Seq[PrimitiveValue], hints: Seq[PrimitiveValue]): Double

    Permalink

    Return confidence on a scale of 0 to 1

    Return confidence on a scale of 0 to 1

    idx

    The index of the variable family to record feedback for

    args

    The skolem identifier for the specific variable to record feedback for

    returns

    The confidence value

    Definition Classes
    SimpleWekaModelModel
  11. var db: Database

    Permalink

    The database is marked transient.

    The database is marked transient. We use the @NeedsReconnectToDatabase trait to ask the deserializer to re-link us.

  12. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. def feedback(idx: Int, args: Seq[PrimitiveValue], v: PrimitiveValue): Unit

    Permalink

    Record feedback given as the "correct" value for a variable represented by this model

    Record feedback given as the "correct" value for a variable represented by this model

    idx

    The index of the variable family to record feedback for

    args

    The skolem identifier for the specific variable to record feedback for

    v

    The correct value for the parameter

    Definition Classes
    SimpleWekaModelModel
  15. val feedback: Map[String, Map[FeedbackSourceIdentifier, PrimitiveValue]]

    Permalink
    Definition Classes
    SourcedFeedbackT
  16. val feedbackSources: Set[FeedbackSourceIdentifier]

    Permalink
    Definition Classes
    SourcedFeedbackT
  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getFeedback(idx: Int, args: Seq[PrimitiveValue]): Option[PrimitiveValue]

    Permalink
    Definition Classes
    SourcedFeedbackT
  20. def getFeedbackKey(idx: Int, args: Seq[PrimitiveValue]): String

    Permalink
    Definition Classes
    SimpleWekaModelSourcedFeedbackT
  21. def getReasonWho(idx: Int, args: Seq[PrimitiveValue]): String

    Permalink
    Definition Classes
    SourcedFeedbackT
  22. def guessInputType: Type

    Permalink
  23. def hackToPreventGUILaunch(): Unit

    Permalink
  24. def hasFeedback(idx: Int, args: Seq[PrimitiveValue]): Boolean

    Permalink
    Definition Classes
    SourcedFeedbackT
  25. def hasGroundFeedback(idx: Int, args: Seq[PrimitiveValue]): Boolean

    Permalink
    Definition Classes
    SourcedFeedbackT
  26. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  27. def hintTypes(idx: Int): Seq[Type]

    Permalink

    The list of expected hint types (may be TAny)

    The list of expected hint types (may be TAny)

    Definition Classes
    SimpleWekaModelModel
  28. def isAcknowledged(idx: Int, args: Seq[PrimitiveValue]): Boolean

    Permalink

    Determine whether a variable represented by this model has been acknowledged or not

    Determine whether a variable represented by this model has been acknowledged or not

    idx

    The index of the variable family to check acknowledgement of

    args

    The skolem identifier for the specific variable to check acknowledgement of

    returns

    True if the variable has been acknowledged

    Definition Classes
    SimpleWekaModelModel
  29. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  30. def learn(dataPoint: Instance): Unit

    Permalink

    Improve the model with one single data point

  31. var learner: Classifier with UpdateableClassifier

    Permalink

    The actual Weka model itself.

    The actual Weka model itself. @SimpleWekaModel is just a wrapper around a Weka @Classifier object. Due to silliness in Weka, @Classifier itself is not serializable, so we mark it transient and use a simple serialization hack. See serializedLearner below.

  32. val name: String

    Permalink
    Definition Classes
    Model
  33. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  36. var numCorrect: Int

    Permalink
  37. var numSamples: Int

    Permalink
  38. def reason(idx: Int, args: Seq[PrimitiveValue], hints: Seq[PrimitiveValue]): String

    Permalink

    Generate a human-readable explanation for the uncertainty captured by this model.

    Generate a human-readable explanation for the uncertainty captured by this model.

    idx

    The index of the variable family to explain

    args

    The skolem identifier for the specific variable to explain

    returns

    A string reason explaining the uncertainty in this model

    Definition Classes
    SimpleWekaModelModel
  39. def reconnectToDatabase(db: Database): Unit

    Permalink

    Re-populate transient fields after being woken up from serialization

    Re-populate transient fields after being woken up from serialization

    Definition Classes
    SimpleWekaModelNeedsReconnectToDatabase
  40. def rowToInstance(row: Seq[PrimitiveValue], dataset: Instances): DenseInstance

    Permalink
  41. def sample(idx: Int, randomness: Random, args: Seq[PrimitiveValue], hints: Seq[PrimitiveValue]): PrimitiveValue

    Permalink

    Generate a sample from the distribution of a variable represented by this model.

    Generate a sample from the distribution of a variable represented by this model.

    idx

    The index of the variable family to generate a sample for

    randomness

    A java.util.Random to use when generating the sample (pre-seeded)

    args

    The skolem identifier for the specific variable to generate a sample for

    returns

    A primitive value representing the generated sample

    Definition Classes
    SimpleWekaModelModel
  42. def sample(idx: Int, seed: Long, args: Seq[PrimitiveValue], hints: Seq[PrimitiveValue]): PrimitiveValue

    Permalink

    Generate a sample from the distribution of a variable represented by this model.

    Generate a sample from the distribution of a variable represented by this model.

    idx

    The index of the variable family to generate a sample for

    seed

    The global world identifier (seed) to sample from

    args

    The skolem identifier for the specific variable to generate a sample for

    returns

    A primitive value representing the generated sample

    Definition Classes
    Model
  43. def serialize(): (Array[Byte], String)

    Permalink

    Interpose on the serialization pipeline to safely serialize the Weka classifier (which doesn't play nicely with ObjOutputStream)

    Interpose on the serialization pipeline to safely serialize the Weka classifier (which doesn't play nicely with ObjOutputStream)

    returns

    A 2-tuple including the serialized encoding, and the name of a deserializer to use when decoding the encoding.

    Definition Classes
    SimpleWekaModelModel
  44. var serializedLearner: Array[Byte]

    Permalink

    Due to silliness in Weka, @Classifier itself is not serializable, and we need to use Weka's internal @SerializationHelper object to do the actual serialization

    Due to silliness in Weka, @Classifier itself is not serializable, and we need to use Weka's internal @SerializationHelper object to do the actual serialization

    The fix is to interpose on the serialization/deserialization process. First, when the model is serialized in serialize(), we serialize Classifier into this byte array. Second, when the @NeedsReconnectToDatabase trait fires --- that is, when the model is re-linked to the database, we take the opportunity to deserialize this field.

    To save space, serializedLearner is kept null, except when the object is being serialized.

  45. def setFeedback(idx: Int, args: Seq[PrimitiveValue], value: PrimitiveValue): Unit

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

    Permalink
    Definition Classes
    AnyRef
  47. def toString(): String

    Permalink

    A string representation of this model

    A string representation of this model

    Definition Classes
    Model → AnyRef → Any
  48. def train(db: Database): Unit

    Permalink

    When the model is created, learn associations from the existing data.

  49. def varType(idx: Int, args: Seq[Type]): Type

    Permalink

    Infer the type of the model from the types of the inputs

    Infer the type of the model from the types of the inputs

    returns

    The type of the value returned by this model

    Definition Classes
    SimpleWekaModelModel
  50. final def wait(): Unit

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

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

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

Inherited from SourcedFeedback

Inherited from SourcedFeedbackT[String]

Inherited from NeedsReconnectToDatabase

Inherited from Model

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped