public class FrameUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FrameUtils.CategoricalBinaryEncoder
Helper to convert a categorical variable into a "binary" encoding format.
|
static class |
FrameUtils.CategoricalEigenEncoder
Helper to convert a categorical variable into the first eigenvector of the dummy-expanded matrix.
|
static class |
FrameUtils.CategoricalEnumLimitedEncoder
Helper to convert a categorical variable into the first eigenvector of the dummy-expanded matrix.
|
static class |
FrameUtils.CategoricalLabelEncoder |
static class |
FrameUtils.CategoricalOneHotEncoder |
static class |
FrameUtils.ExportTaskDriver |
static class |
FrameUtils.MissingInserter
Helper to insert missing values into a Frame
|
static class |
FrameUtils.WeightedMean |
Constructor and Description |
---|
FrameUtils() |
Modifier and Type | Method and Description |
---|---|
static double[] |
asDoubles(Vec v) |
static int[] |
asInts(Vec v) |
static Frame |
categoricalEncoder(Frame dataset,
java.lang.String[] skipCols,
Model.Parameters.CategoricalEncodingScheme scheme,
ToEigenVec tev,
int maxLevels) |
static ChunkSummary |
chunkSummary(Frame fr)
Compute a chunk summary (how many chunks of each type, relative size, total size)
|
static void |
cleanUp(IcedHashMap<Key,java.lang.String> toDelete) |
static Key[] |
generateNumKeys(Key mk,
int num)
Generate given numbers of keys by suffixing key by given numbered suffix.
|
static Key[] |
generateNumKeys(Key mk,
int num,
java.lang.String delim) |
static ParseSetup |
guessParserSetup(ParseSetup userParserSetup,
java.net.URI... uris) |
static Frame |
parseFrame(Key okey,
java.io.File... files)
Parse given file(s) into the form of single frame represented by the given key.
|
static Frame |
parseFrame(Key okey,
ParseSetup parseSetup,
java.net.URI... uris) |
static Frame |
parseFrame(Key okey,
java.net.URI... uris)
Parse given set of URIs and produce a frame's key representing output.
|
static void |
printTopCategoricalLevels(Frame fr,
boolean warn,
int topK) |
static void |
shrinkDomainsToObservedSubset(Frame frameToModifyInPlace)
reduce the domains of all categorical columns to the actually observed subset
|
static double |
sparseRatio(Chunk[] chks)
compute fraction of sparse chunks in this array.
|
static double |
sparseRatio(Frame fr) |
public static Frame parseFrame(Key okey, java.io.File... files) throws java.io.IOException
okey
- destination key for parsed framefiles
- files to parsejava.io.IOException
public static Frame parseFrame(Key okey, java.net.URI... uris) throws java.io.IOException
okey
- key for ouput frame. Can be nulluris
- array of URI (file://, hdfs://, s3n://, s3a://, s3://, ...) to parsejava.io.IOException
- in case of parse error.public static Frame parseFrame(Key okey, ParseSetup parseSetup, java.net.URI... uris) throws java.io.IOException
java.io.IOException
public static ParseSetup guessParserSetup(ParseSetup userParserSetup, java.net.URI... uris) throws java.io.IOException
java.io.IOException
public static Frame categoricalEncoder(Frame dataset, java.lang.String[] skipCols, Model.Parameters.CategoricalEncodingScheme scheme, ToEigenVec tev, int maxLevels)
public static void printTopCategoricalLevels(Frame fr, boolean warn, int topK)
public static double[] asDoubles(Vec v)
public static int[] asInts(Vec v)
public static ChunkSummary chunkSummary(Frame fr)
fr
- public static Key[] generateNumKeys(Key mk, int num)
public static double sparseRatio(Chunk[] chks)
chks
- public static double sparseRatio(Frame fr)
public static void cleanUp(IcedHashMap<Key,java.lang.String> toDelete)
public static void shrinkDomainsToObservedSubset(Frame frameToModifyInPlace)
frameToModifyInPlace
-