|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.json.JSONInstances
public class JSONInstances
Class for transforming Instances objects into JSON objects and vice versa.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTES
the attributes object. |
static java.lang.String |
CLASS
the class attribute indicator. |
static java.lang.String |
DATA
the data section. |
static java.lang.String |
DATEFORMAT
the dateformat attribute. |
static java.lang.String |
HEADER
the header section. |
static java.lang.String |
LABELS
the labels attribute. |
static java.lang.String |
NAME
the name attribute. |
static java.lang.String |
RELATION
the relation name. |
static java.lang.String |
SPARSE
the sparse attribute. |
static java.lang.String |
SPARSE_SEPARATOR
the separator for index/value in case of sparse instances. |
static java.lang.String |
TYPE
the type attribute. |
static java.lang.String |
VALUES
the values attribute. |
static java.lang.String |
WEIGHT
the weight attribute. |
Constructor Summary | |
---|---|
JSONInstances()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
For testing only. |
static Instances |
toHeader(JSONNode json)
Turns a JSON object, if possible, into an Instances object (only header). |
static Instances |
toInstances(JSONNode json)
Turns a JSON object, if possible, into an Instances object. |
static JSONNode |
toJSON(Instances inst)
Turns the Instances object into a JSON object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HEADER
public static final java.lang.String DATA
public static final java.lang.String RELATION
public static final java.lang.String ATTRIBUTES
public static final java.lang.String NAME
public static final java.lang.String TYPE
public static final java.lang.String CLASS
public static final java.lang.String LABELS
public static final java.lang.String WEIGHT
public static final java.lang.String DATEFORMAT
public static final java.lang.String SPARSE
public static final java.lang.String VALUES
public static final java.lang.String SPARSE_SEPARATOR
Constructor Detail |
---|
public JSONInstances()
Method Detail |
---|
public static Instances toInstances(JSONNode json)
json
- the JSON object to convert
public static Instances toHeader(JSONNode json)
json
- the JSON object to convert
public static JSONNode toJSON(Instances inst)
inst
- the Instances to turn into a JSON object
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- expects a dataset as first parameter
java.lang.Exception
- if something goes wrong
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |