Class

com.johnsnowlabs.ml.tensorflow

AssertionDatasetEncoder

Related Doc: package tensorflow

Permalink

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)

    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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def centerIfTooLong(maxSentLen: Int)(sentence: WordpieceEmbeddingsSentence, start: Int, end: Int): (WordpieceEmbeddingsSentence, Int, Int)

    Permalink

    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

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

    Permalink

    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): AssertionBatch

    Permalink

    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]

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. val extraFeatSize: Int

    Permalink
  13. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def l2norm(xs: Array[Float]): Float

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  19. val nonTargetMark: Array[Float]

    Permalink
  20. def normalize(vec: Array[Float]): Array[Float]

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef
  23. val params: DatasetEncoderParams

    Permalink
  24. def randomSplit(dataset: Seq[Datapoint], fraction: Float): (Seq[Datapoint], Seq[Datapoint])

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  26. val targetMark: Array[Float]

    Permalink
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped