Packages

class AssertionLogRegModel extends Model[AssertionLogRegModel] with RawAnnotator[AssertionLogRegModel] with Windowing with HasStorageRef with CanBeLazy with CheckLicense

This is a main class in AssertionLogReg family. Logarithmic Regression is used to extract Assertion Status from extracted entities and text. AssertionLogRegModel requires DOCUMENT, CHUNK and WORD_EMBEDDINGS type annotator inputs, which can be obtained by e.g a DocumentAssembler, NerConverter and WordEmbeddingsModel. The result is an assertion status annotation for each recognized entity. Possible values are "Negated", "Affirmed" and "Historical".

Unlike the DL Model, this class does not extend AnnotatorModel. Instead it extends the RawAnnotator, that's why the main point of interest is method transform().

At the moment there are no pretrained models available for this class. Please refer to AssertionLogRegApproach to train your own model.

See also

AssertionLogRegApproach to train a custom model

AssertionDLModel for deep learning extraction

Linear Supertypes
CheckLicense, CanBeLazy, HasStorageRef, Windowing, RawAnnotator[AssertionLogRegModel], HasOutputAnnotationCol, HasInputAnnotationCols, HasOutputAnnotatorType, ParamsAndFeaturesWritable, HasFeatures, DefaultParamsWritable, MLWritable, Model[AssertionLogRegModel], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. AssertionLogRegModel
  2. CheckLicense
  3. CanBeLazy
  4. HasStorageRef
  5. Windowing
  6. RawAnnotator
  7. HasOutputAnnotationCol
  8. HasInputAnnotationCols
  9. HasOutputAnnotatorType
  10. ParamsAndFeaturesWritable
  11. HasFeatures
  12. DefaultParamsWritable
  13. MLWritable
  14. Model
  15. Transformer
  16. PipelineStage
  17. Logging
  18. Params
  19. Serializable
  20. Serializable
  21. Identifiable
  22. AnyRef
  23. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AssertionLogRegModel()
  2. new AssertionLogRegModel(uid: String)

    uid

    a unique identifier for the instantiated AnnotatorModel

Type Members

  1. type AnnotatorType = String
    Definition Classes
    HasOutputAnnotatorType
  2. case class VectorizedChunk(vector: Vector, begin: Int, end: Int, sentenceId: Int, chunkId: Int) extends Product with Serializable
    Attributes
    protected
    Definition Classes
    Windowing

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def $[T](param: Param[T]): T
    Attributes
    protected
    Definition Classes
    Params
  4. def $$[T](feature: StructFeature[T]): T
    Attributes
    protected
    Definition Classes
    HasFeatures
  5. def $$[K, V](feature: MapFeature[K, V]): Map[K, V]
    Attributes
    protected
    Definition Classes
    HasFeatures
  6. def $$[T](feature: SetFeature[T]): Set[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  7. def $$[T](feature: ArrayFeature[T]): Array[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. lazy val after: Int
    Definition Classes
    AssertionLogRegModelWindowing
  10. val afterParam: IntParam

    Length of the context after the target (Default: 13)

  11. def applyWindow(tokenizedSentence: WordpieceEmbeddingsSentence, s: Int, e: Int, embeddingsDim: Int): Array[Double]
    Definition Classes
    Windowing
  12. def applyWindowContext(tokenizedSentence: WordpieceEmbeddingsSentence, s: Int, e: Int, embeddingsDim: Int): (Array[Array[Float]], Array[Array[Float]], Array[Array[Float]])
    Definition Classes
    Windowing
  13. def applyWindowUdf(embeddingsDim: Int): UserDefinedFunction
    Definition Classes
    Windowing
  14. def applyWindowUdfChunk(embeddingsDim: Int): UserDefinedFunction
    Definition Classes
    Windowing
  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. lazy val before: Int
    Definition Classes
    AssertionLogRegModelWindowing
  17. val beforeParam: IntParam

    Length of the context before the target (Default: 11)

  18. final def checkSchema(schema: StructType, inputAnnotatorType: String): Boolean
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  19. def checkValidEnvironment(spark: Option[SparkSession], scopes: Seq[String]): Unit
    Definition Classes
    CheckLicense
  20. def checkValidScope(scope: String): Unit
    Definition Classes
    CheckLicense
  21. def checkValidScopeAndEnvironment(scope: String, spark: Option[SparkSession], checkLp: Boolean): Unit
    Definition Classes
    CheckLicense
  22. def checkValidScopesAndEnvironment(scopes: Seq[String], spark: Option[SparkSession], checkLp: Boolean): Unit
    Definition Classes
    CheckLicense
  23. final def clear(param: Param[_]): AssertionLogRegModel.this.type
    Definition Classes
    Params
  24. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  25. def copy(extra: ParamMap): AssertionLogRegModel

    requirement for annotators copies

    requirement for annotators copies

    Definition Classes
    AssertionLogRegModel → RawAnnotator → Model → Transformer → PipelineStage → Params
  26. def copyValues[T <: Params](to: T, extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  27. def createDatabaseConnection(database: Name): RocksDBConnection
    Definition Classes
    HasStorageRef
  28. final def defaultCopy[T <: Params](extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  29. val endCol: Param[String]

    Column that contains the token number for the end of the target

  30. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  32. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  33. def explainParams(): String
    Definition Classes
    Params
  34. def extraValidate(structType: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  35. def extraValidateMsg: String
    Attributes
    protected
    Definition Classes
    RawAnnotator
  36. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  37. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  38. val features: ArrayBuffer[Feature[_, _, _]]
    Definition Classes
    HasFeatures
  39. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  40. def get[T](feature: StructFeature[T]): Option[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  41. def get[K, V](feature: MapFeature[K, V]): Option[Map[K, V]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  42. def get[T](feature: SetFeature[T]): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  43. def get[T](feature: ArrayFeature[T]): Option[Array[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  44. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  45. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  46. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  47. def getInputCols: Array[String]
    Definition Classes
    HasInputAnnotationCols
  48. def getLazyAnnotator: Boolean
    Definition Classes
    CanBeLazy
  49. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  50. final def getOutputCol: String
    Definition Classes
    HasOutputAnnotationCol
  51. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  52. def getStorageRef: String
    Definition Classes
    HasStorageRef
  53. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  54. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  55. def hasParent: Boolean
    Definition Classes
    Model
  56. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  57. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  58. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  59. val inputAnnotatorTypes: Array[String]

    Input annotator types: DOCUMENT, CHUNK, WORD_EMBEDDINGS

    Input annotator types: DOCUMENT, CHUNK, WORD_EMBEDDINGS

    Definition Classes
    AssertionLogRegModel → HasInputAnnotationCols
  60. final val inputCols: StringArrayParam
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  61. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  62. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  63. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  64. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  65. def l2norm(xs: Array[Double]): Double
    Definition Classes
    Windowing
  66. var labelMap: MapFeature[Double, String]
  67. val lazyAnnotator: BooleanParam
    Definition Classes
    CanBeLazy
  68. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  69. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  70. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  71. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  72. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  73. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  74. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  75. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  76. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  77. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  78. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  79. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  80. var model: StructFeature[LogisticRegressionModel]
  81. def msgHelper(schema: StructType): String
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  82. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  83. def normalize(vec: Array[Double]): Array[Double]
    Definition Classes
    Windowing
  84. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  85. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  86. def onWrite(path: String, spark: SparkSession): Unit
    Attributes
    protected
    Definition Classes
    ParamsAndFeaturesWritable
  87. val optionalInputAnnotatorTypes: Array[String]
    Definition Classes
    HasInputAnnotationCols
  88. val outputAnnotatorType: AnnotatorType

    Output annotator types: ASSERTION

    Output annotator types: ASSERTION

    Definition Classes
    AssertionLogRegModel → HasOutputAnnotatorType
  89. final val outputCol: Param[String]
    Attributes
    protected
    Definition Classes
    HasOutputAnnotationCol
  90. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  91. var parent: Estimator[AssertionLogRegModel]
    Definition Classes
    Model
  92. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  93. def set[T](feature: StructFeature[T], value: T): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  94. def set[K, V](feature: MapFeature[K, V], value: Map[K, V]): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  95. def set[T](feature: SetFeature[T], value: Set[T]): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  96. def set[T](feature: ArrayFeature[T], value: Array[T]): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  97. final def set(paramPair: ParamPair[_]): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  98. final def set(param: String, value: Any): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  99. final def set[T](param: Param[T], value: T): AssertionLogRegModel.this.type
    Definition Classes
    Params
  100. def setAfter(after: Int): AssertionLogRegModel.this.type

    Length of the context after the target (Default: 13)

  101. def setBefore(before: Int): AssertionLogRegModel.this.type

    Length of the context before the target (Default: 11)

  102. def setDefault[T](feature: StructFeature[T], value: () ⇒ T): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  103. def setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  104. def setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  105. def setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  106. final def setDefault(paramPairs: ParamPair[_]*): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  107. final def setDefault[T](param: Param[T], value: T): AssertionLogRegModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  108. def setEndCol(end: String): AssertionLogRegModel.this.type

    Column that contains the token number for the end of the target

  109. final def setInputCols(value: String*): AssertionLogRegModel.this.type
    Definition Classes
    HasInputAnnotationCols
  110. def setInputCols(value: Array[String]): AssertionLogRegModel.this.type
    Definition Classes
    HasInputAnnotationCols
  111. def setLabelMap(labelMappings: Map[String, Double]): AssertionLogRegModel.this.type
  112. def setLazyAnnotator(value: Boolean): AssertionLogRegModel.this.type
    Definition Classes
    CanBeLazy
  113. def setModel(m: LogisticRegressionModel): AssertionLogRegModel.this.type
  114. final def setOutputCol(value: String): AssertionLogRegModel.this.type
    Definition Classes
    HasOutputAnnotationCol
  115. def setParent(parent: Estimator[AssertionLogRegModel]): AssertionLogRegModel
    Definition Classes
    Model
  116. def setStartCol(start: String): AssertionLogRegModel.this.type

    Column that contains the token number for the start of the target

  117. def setStorageRef(value: String): AssertionLogRegModel.this.type
    Definition Classes
    HasStorageRef
  118. val startCol: Param[String]

    Column that contains the token number for the start of the target

  119. val storageRef: Param[String]
    Definition Classes
    HasStorageRef
  120. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  121. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  122. def tokenIndexToChunkIndex(doc: Array[TokenPieceEmbeddings], start: Int, end: Int): (Int, Int)
    Definition Classes
    Windowing
  123. final def transform(dataset: Dataset[_]): DataFrame

    This is main point of interest.

    This is main point of interest. It gets the input dataset transformed into the dataframe with predictions and probabilities This method utilises chunk groups, word piece embeddings and conversion to chunk indexes

    dataset

    an input dataset

    returns

    a DataFrame with probabilities of predictions

    Definition Classes
    AssertionLogRegModel → Transformer
  124. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  125. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  126. final def transformSchema(schema: StructType): StructType
    Definition Classes
    RawAnnotator → PipelineStage
  127. def transformSchema(schema: StructType, logging: Boolean): StructType
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  128. val uid: String
    Definition Classes
    AssertionLogRegModel → Identifiable
  129. def validate(schema: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  130. def validateStorageRef(dataset: Dataset[_], inputCols: Array[String], annotatorType: String): Unit
    Definition Classes
    HasStorageRef
  131. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  132. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  133. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  134. def wrapColumnMetadata(col: Column): Column
    Attributes
    protected
    Definition Classes
    RawAnnotator
  135. def write: MLWriter
    Definition Classes
    ParamsAndFeaturesWritable → DefaultParamsWritable → MLWritable

Inherited from CheckLicense

Inherited from CanBeLazy

Inherited from HasStorageRef

Inherited from Windowing

Inherited from RawAnnotator[AssertionLogRegModel]

Inherited from HasOutputAnnotationCol

Inherited from HasInputAnnotationCols

Inherited from HasOutputAnnotatorType

Inherited from ParamsAndFeaturesWritable

Inherited from HasFeatures

Inherited from DefaultParamsWritable

Inherited from MLWritable

Inherited from Model[AssertionLogRegModel]

Inherited from Transformer

Inherited from PipelineStage

Inherited from Logging

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

Parameters

Annotator types

Required input and expected output annotator types

Members

Parameter setters