public class EncoderMVImpute extends LegacyEncoder
| Modifier and Type | Class and Description |
|---|---|
static class |
EncoderMVImpute.MVMethod |
| Constructor and Description |
|---|
EncoderMVImpute() |
EncoderMVImpute(int[] colList,
EncoderMVImpute.MVMethod[] mvMethodList,
String[] replacementList,
KahanObject[] meanList,
long[] countList,
List<Integer> rcList,
int clen) |
EncoderMVImpute(org.apache.wink.json4j.JSONObject parsedSpec,
String[] colnames,
int clen,
int minCol,
int maxCol) |
| Modifier and Type | Method and Description |
|---|---|
MatrixBlock |
apply(FrameBlock in,
MatrixBlock out)
Encode input data blockwise according to existing transform meta data (transform apply).
|
void |
build(FrameBlock in)
Build the transform meta data for the given block input.
|
MatrixBlock |
encode(FrameBlock in,
MatrixBlock out)
Block encode: build and apply (transform encode).
|
HashMap<String,Long> |
getHistogram(int colID)
Exposes the internal histogram after build.
|
KahanObject[] |
getMeans() |
FrameBlock |
getMetaData(FrameBlock out)
Construct a frame block out of the transform meta data.
|
EncoderMVImpute.MVMethod |
getMethod(int colID) |
long |
getNonMVCount(int colID) |
String |
getReplacement(int colID) |
String[] |
getReplacements() |
void |
initMetaData(FrameBlock meta)
Sets up the required meta data for a subsequent call to apply.
|
void |
initRecodeIDList(List<Integer> rcList) |
void |
mergeAt(LegacyEncoder other,
int row,
int col)
Merges another encoder, of a compatible type, in after a certain position.
|
void |
readExternal(ObjectInput in)
Redirects the default java serialization via externalizable to our default hadoop writable serialization for
efficient broadcast/rdd deserialization.
|
LegacyEncoder |
subRangeEncoder(IndexRange ixRange)
Returns a new Encoder that only handles a sub range of columns.
|
void |
writeExternal(ObjectOutput out)
Redirects the default java serialization via externalizable to our default hadoop writable serialization for
efficient broadcast/rdd serialization.
|
buildPartial, getColList, getColMapping, initColList, initColList, isApplicable, isApplicable, prepareBuildPartial, setColList, shiftCols, updateIndexRangespublic EncoderMVImpute(org.apache.wink.json4j.JSONObject parsedSpec,
String[] colnames,
int clen,
int minCol,
int maxCol)
throws org.apache.wink.json4j.JSONException
org.apache.wink.json4j.JSONExceptionpublic EncoderMVImpute()
public EncoderMVImpute(int[] colList,
EncoderMVImpute.MVMethod[] mvMethodList,
String[] replacementList,
KahanObject[] meanList,
long[] countList,
List<Integer> rcList,
int clen)
public String[] getReplacements()
public KahanObject[] getMeans()
public EncoderMVImpute.MVMethod getMethod(int colID)
public long getNonMVCount(int colID)
public String getReplacement(int colID)
public MatrixBlock encode(FrameBlock in, MatrixBlock out)
LegacyEncoderencode in class LegacyEncoderin - input frame blockout - output matrix blockpublic void build(FrameBlock in)
LegacyEncoderbuild in class LegacyEncoderin - input frame blockpublic MatrixBlock apply(FrameBlock in, MatrixBlock out)
LegacyEncoderapply in class LegacyEncoderin - input frame blockout - output matrix blockpublic LegacyEncoder subRangeEncoder(IndexRange ixRange)
LegacyEncodersubRangeEncoder in class LegacyEncoderixRange - the range (1-based, begin inclusive, end exclusive)public void mergeAt(LegacyEncoder other, int row, int col)
LegacyEncoderEncoders are compatible with themselves and EncoderComposite is compatible with every
other Encoder.mergeAt in class LegacyEncoderother - the encoder that should be merged inrow - the row where it should be placed (1-based)col - the col where it should be placed (1-based)public FrameBlock getMetaData(FrameBlock out)
LegacyEncodergetMetaData in class LegacyEncoderout - output frame blockpublic void initMetaData(FrameBlock meta)
LegacyEncoderinitMetaData in class LegacyEncodermeta - frame blockpublic HashMap<String,Long> getHistogram(int colID)
colID - column IDpublic void writeExternal(ObjectOutput out) throws IOException
LegacyEncoderwriteExternal in interface ExternalizablewriteExternal in class LegacyEncoderout - object outputIOException - if IOException occurspublic void readExternal(ObjectInput in) throws IOException
LegacyEncoderreadExternal in interface ExternalizablereadExternal in class LegacyEncoderin - object inputIOException - if IOException occurCopyright © 2021 The Apache Software Foundation. All rights reserved.