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 getLabelMap: Map[Double, String]

    Gets labelMap parameter

  49. def getLazyAnnotator: Boolean
    Definition Classes
    CanBeLazy
  50. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  51. final def getOutputCol: String
    Definition Classes
    HasOutputAnnotationCol
  52. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  53. def getStorageRef: String
    Definition Classes
    HasStorageRef
  54. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  55. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  56. def hasParent: Boolean
    Definition Classes
    Model
  57. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  58. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  59. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  60. val inputAnnotatorTypes: Array[String]

    Input annotator types: DOCUMENT, CHUNK, WORD_EMBEDDINGS

    Input annotator types: DOCUMENT, CHUNK, WORD_EMBEDDINGS

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

    Output annotator types: ASSERTION

    Output annotator types: ASSERTION

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

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

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

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

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

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

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

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

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

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

  120. val storageRef: Param[String]
    Definition Classes
    HasStorageRef
  121. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  122. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  123. def tokenIndexToChunkIndex(doc: Array[TokenPieceEmbeddings], start: Int, end: Int): (Int, Int)
    Definition Classes
    Windowing
  124. 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
  125. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  126. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  127. final def transformSchema(schema: StructType): StructType
    Definition Classes
    RawAnnotator → PipelineStage
  128. def transformSchema(schema: StructType, logging: Boolean): StructType
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  129. val uid: String
    Definition Classes
    AssertionLogRegModel → Identifiable
  130. def validate(schema: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  131. def validateStorageRef(dataset: Dataset[_], inputCols: Array[String], annotatorType: String): Unit
    Definition Classes
    HasStorageRef
  132. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  133. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  134. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  135. def wrapColumnMetadata(col: Column): Column
    Attributes
    protected
    Definition Classes
    RawAnnotator
  136. 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

Parameter getters