c

com.johnsnowlabs.ml.tensorflow

AssertionDatasetEncoder

class AssertionDatasetEncoder extends AnyRef

This class contains methods for working with assertion dataset, such as split, normalise, decode

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AssertionDatasetEncoder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AssertionDatasetEncoder(params: DatasetEncoderParams, extraFeatSize: Int = 10)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def centerIfTooLong(maxSentLen: Int)(sentence: WordpieceEmbeddingsSentence, start: Int, end: Int): (WordpieceEmbeddingsSentence, Int, Int)

    This method normalizes the input sentence by centering it around the target This method should apply only if the target sentence is outside the max sentence length

    This method normalizes the input sentence by centering it around the target This method should apply only if the target sentence is outside the max sentence length

    maxSentLen

    an array of sentences to encode

    sentence

    a candidate sentence to center for

    start

    a start index

    end

    an end index

    returns

    a triplet, which contains embedding sentence, begin and end indexes

    Attributes
    protected
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. def decodeOutputData(tagIds: Array[Int]): Array[String]

    This method decodes array on Int

    This method decodes array on Int

    tagIds

    an Array of Int, to decode for

    returns

    an Array of String, which represents decoded instances

  8. def encodeInputData(sentences: Array[WordpieceEmbeddingsSentence], start: Array[Int], end: Array[Int], embeddingsDim: Int, maxSentenceLength: Int, scopeWindow: (Int, Int)): AssertionBatch

    This method encodes the sentences using the embeddings dimensionality, start and end index At this point the graph does not support feeding a dynamic maxSentenceLength

    This method encodes the sentences using the embeddings dimensionality, start and end index At this point the graph does not support feeding a dynamic maxSentenceLength

    sentences

    an array of sentences to encode

    start

    an array of start positions

    end

    an array of end positions

    embeddingsDim

    a dimensionality of target Embeddings

    maxSentenceLength

    a length, which constrains the maximum sentence length

    returns

    an instance of AssertionBatch

  9. def encodeOneHot(label: String): Array[Float]

    This method performs one hot encoding of the label

    This method performs one hot encoding of the label

    label

    a label to represent as one-hot representation

    returns

    an array in one-hot format, representing input label

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. val extraFeatSize: Int
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def l2norm(xs: Array[Float]): Float

    This simple method computes L2 distance of input array

    This simple method computes L2 distance of input array

    xs

    an array of Float to get the distance for

    returns

    a Float, representing L2 distance

  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. val nonTargetMark: Seq[Float]
  20. final def normalize(vec: Array[Float]): Array[Float]

    This method normalizes the input array using the L2 norm distance

    This method normalizes the input array using the L2 norm distance

    vec

    an array of Float to normalize

    returns

    a normalized version of input array

  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. val params: DatasetEncoderParams
  24. def randomSplit(dataset: Seq[Datapoint], fraction: Float): (Seq[Datapoint], Seq[Datapoint])

    This method splits the input dataset into the train and test with given proportion

    This method splits the input dataset into the train and test with given proportion

    dataset

    a Sequence of DataPoints to split for

    fraction

    a proportion which represents in what scale we need to split the input data

    returns

    train and test fraction of original dataset

  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. val tags: Array[String]
  27. val tags2Id: Map[String, Int]
  28. val targetMark: Seq[Float]
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped