public class FrameUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
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 ChunkSummary |
chunkSummary(Frame fr)
Compute a chunk summary (how many chunks of each type, relative size, total size)
|
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 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,
java.net.URI... uris)
Parse given set of URIs and produce a frame's key representing output.
|
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 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(Frame fr)
public static double sparseRatio(Chunk[] chks)
chks
-