public class CategoricalWrappedVec extends Vec
The Vector's domain is the union of the Test and Train domains.
The mapping is defined by int[] array, size is input Test.domain.length. Contents refer to values in the Train.domain. Extra values in the Test domain are sorted after the Train.domain - so mapped values have to be range-checked (note that returning some flag for NA, say -1, would also need to be checked for).
Modifier and Type | Class and Description |
---|---|
static class |
CategoricalWrappedVec.CategoricalWrappedChunk |
Vec.ESPC, Vec.Reader, Vec.VectorGroup, Vec.Writer
_rowLayout, DO_HISTOGRAMS, KEY_PREFIX_LEN, PERCENTILES, T_BAD, T_CAT, T_NUM, T_STR, T_TIME, T_UUID, TYPE_STR
Constructor and Description |
---|
CategoricalWrappedVec(Key key,
int rowLayout,
java.lang.String[] toDomain,
Key masterVecKey)
Main constructor: convert from one categorical to another
|
Modifier and Type | Method and Description |
---|---|
Chunk |
chunkForChunkIdx(int cidx)
The Chunk for a chunk#.
|
static int[] |
computeMap(java.lang.String[] from,
java.lang.String[] to) |
Vec |
doCopy() |
Vec |
masterVec() |
adaptTo, align, at, at16h, at16l, at8, atStr, base, bins, byteSize, cardinality, checksum_impl, chunkForRow, chunkIdx, chunkKey, chunkKey, copyMeta, domain, elem2ChunkIdx, equals, espc, factor, get_type_str, get_type, getVecKey, group, hashCode, isBad, isBinary, isCategorical, isConst, isInt, isNA, isNumeric, isString, isTime, isUUID, lazy_bins, length, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCon, makeCons, makeCons, makeCopy, makeCopy, makeCopy, makeDoubles, makeRand, makeRepSeq, makeSeq, makeSeq, makeSeq, makeVec, makeVec, makeVec, makeZero, makeZero, makeZero, makeZero, makeZeros, makeZeros, max, maxs, mean, min, mins, mode, naCnt, nChunks, newKey, ninfs, nzCnt, open, pctiles, pinfs, postWrite, preWriting, readAll_impl, remove_impl, rollupStatsKey, set, set, set, set, setBad, setDomain, sigma, sparseRatio, startRollupStats, startRollupStats, stride, toCategoricalVec, toNumericVec, toString, toStringVec, writeAll_impl
checksum, makeSchema, readAll, remove, remove, remove, remove, writeAll
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal, writeJSON
public static int[] computeMap(java.lang.String[] from, java.lang.String[] to)
public Chunk chunkForChunkIdx(int cidx)
Vec
public Vec masterVec()