Package org.apache.sysds.runtime.transform.encode

# Class ColumnEncoderWordEmbedding

java.lang.Object
org.apache.sysds.runtime.transform.encode.ColumnEncoder
org.apache.sysds.runtime.transform.encode.ColumnEncoderWordEmbedding

All Implemented Interfaces:
  `Externalizable`, `Serializable`, `Comparable<ColumnEncoder>`, `Encoder`

public class ColumnEncoderWordEmbedding extends ColumnEncoder

See Also:
  - Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from class org.apache.sysds.runtime.transform.encode.ColumnEncoder

`ColumnEncoder.EncoderType`

## Field Summary

### Fields inherited from class org.apache.sysds.runtime.transform.encode.ColumnEncoder

`APPLY_ROW_BLOCKS_PER_COLUMN, BUILD_ROW_BLOCKS_PER_COLUMN`

## Constructor Summary

Constructors
Constructor
Description
`ColumnEncoderWordEmbedding()`

## Method Summary

Modifier and Type
Method
Description
`void`
`allocateMetaData(FrameBlock meta)`
Pre-allocate a FrameBlock for metadata collection.
`void`
`applyDense(CacheBlock<?> in, MatrixBlock out, int outputCol, int rowStart, int blk)`
`void`
`build(CacheBlock<?> in)`
Build the transform meta data for the given block input.
`int`
`getDomainSize()`
`FrameBlock`
`getMetaData(FrameBlock out)`
Construct a frame block out of the transform meta data.
`int`
`getNrDistinctEmbeddings()`
`void`
`initEmbeddings(MatrixBlock embeddings)`
`void`
`initMetaData(FrameBlock meta)`
Sets up the required meta data for a subsequent call to apply.
`void`
`readExternal(ObjectInput in)`
Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.
`void`
`writeExternal(ObjectOutput out)`
Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.

### Methods inherited from class org.apache.sysds.runtime.transform.encode.ColumnEncoder

`apply, apply, build, build, buildPartial, compareTo, computeMapSizeEstimate, getApplyTasks, getBuildTask, getBuildTasks, getColID, getColMapping, getEstMetaSize, getEstNumDistincts, getPartialBuildTask, getPartialMergeBuildTask, isApplicable, isApplicable, mergeAt, prepareBuildPartial, setColID, setEstMetaSize, setEstNumDistincts, shiftCol, updateIndexRanges`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ColumnEncoderWordEmbedding

public ColumnEncoderWordEmbedding()

## Method Details

### getDomainSize

public int getDomainSize()

Overrides:
  `getDomainSize` in class `ColumnEncoder`

### getNrDistinctEmbeddings

public int getNrDistinctEmbeddings()

### applyDense

public void applyDense(CacheBlock<?> in, MatrixBlock out, int outputCol, int rowStart, int blk)

### build

public void build(CacheBlock<?> in)
Description copied from interface: `Encoder`
Build the transform meta data for the given block input. This call modifies and keeps meta data as encoder state.

Parameters:
  `in` - input frame block

### allocateMetaData

public void allocateMetaData(FrameBlock meta)
Description copied from interface: `Encoder`
Pre-allocate a FrameBlock for metadata collection.

Parameters:
  `meta` - frame block

### getMetaData

public FrameBlock getMetaData(FrameBlock out)
Description copied from interface: `Encoder`
Construct a frame block out of the transform meta data.

Parameters:
  `out` - output frame block
Returns:
  output frame block?

### initMetaData

public void initMetaData(FrameBlock meta)
Description copied from interface: `Encoder`
Sets up the required meta data for a subsequent call to apply.

Parameters:
  `meta` - frame block

### initEmbeddings

public void initEmbeddings(MatrixBlock embeddings)

Overrides:
  `initEmbeddings` in class `ColumnEncoder`

### writeExternal

public void writeExternal(ObjectOutput out) throws IOException
Description copied from class: `ColumnEncoder`
Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd serialization.

Specified by:
  `writeExternal` in interface `Externalizable`
Overrides:
  `writeExternal` in class `ColumnEncoder`
Parameters:
  `out` - object output
Throws:
  `IOException` - if IOException occurs

### readExternal

public void readExternal(ObjectInput in) throws IOException
Description copied from class: `ColumnEncoder`
Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast/rdd deserialization.

Specified by:
  `readExternal` in interface `Externalizable`
Overrides:
  `readExternal` in class `ColumnEncoder`
Parameters:
  `in` - object input
Throws:
  `IOException` - if IOException occur