|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.dfki.madm.mlwizard.Util
public class Util
Field Summary | |
---|---|
static java.lang.String |
DATASETS_FOLDER
|
static java.lang.String |
FILE_PATH
|
static java.lang.String |
RESOURCE_PATH
|
Constructor Summary | |
---|---|
Util()
|
Method Summary | ||
---|---|---|
static com.rapidminer.operator.meta.ParameterSet |
combineParameterSets(com.rapidminer.operator.meta.ParameterSet p1,
com.rapidminer.operator.meta.ParameterSet p2,
com.rapidminer.operator.performance.PerformanceVector pv)
combine two parameter sets |
|
static double |
dist(com.rapidminer.example.Example a,
com.rapidminer.example.Example b)
computes the squared euclidean distance between a and b (omits the square root calculation for efficiency reasons) |
|
static double |
dist(com.rapidminer.example.Example a,
com.rapidminer.example.Example b,
com.rapidminer.example.AttributeWeights weights)
computes the squared euclidean distance between a and b (omits the square root calculation for efficiency reasons) using the given set of attributes only |
|
static double |
dist(com.rapidminer.example.Example a,
com.rapidminer.example.Example b,
long mask)
computes the squared euclidean distance between a and b (omits the square root calculation for efficiency reasons) using the given binary mask of attribute |
|
static com.rapidminer.example.Example |
getExampleFromId(com.rapidminer.example.ExampleSet exampleSet,
java.lang.String id)
gets the example with the given id using a linear search |
|
static java.io.InputStream |
getStream(java.lang.String name)
|
|
static java.io.InputStream |
getStreamFromFile(java.lang.String filePath)
|
|
static java.io.InputStream |
getStreamFromResource(java.lang.String resourcePath)
|
|
static com.rapidminer.example.ExampleSet |
mergeExampleSets(com.rapidminer.example.ExampleSet a,
com.rapidminer.example.ExampleSet b)
|
|
static
|
read(java.lang.String name,
java.lang.Class<T> clazz)
reads an object from a resource or a file. |
|
static java.lang.String |
readFileAsString(java.lang.String filePath)
|
|
static
|
readFromFile(java.lang.String filePath,
java.lang.Class<T> clazz)
reads an IOObject from a file |
|
static
|
readFromRepository(java.lang.String location,
java.lang.Class<T> clazz)
|
|
static
|
readFromResource(java.lang.String resourcePath,
java.lang.Class<T> clazz)
reads an IOObject from a resource |
|
static void |
write(java.lang.String name,
com.rapidminer.operator.IOObject object)
|
|
static void |
writeToRepository(com.rapidminer.operator.IOObject object,
java.lang.String location)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RESOURCE_PATH
public static final java.lang.String FILE_PATH
public static final java.lang.String DATASETS_FOLDER
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static com.rapidminer.example.Example getExampleFromId(com.rapidminer.example.ExampleSet exampleSet, java.lang.String id)
exampleSet
- the datasetid
- the desired id
public static double dist(com.rapidminer.example.Example a, com.rapidminer.example.Example b)
a
- example ab
- example b
public static double dist(com.rapidminer.example.Example a, com.rapidminer.example.Example b, com.rapidminer.example.AttributeWeights weights)
a
- example ab
- example bweights
- only attributes with a weight >=1 will be used within the distance calculation
public static double dist(com.rapidminer.example.Example a, com.rapidminer.example.Example b, long mask)
a
- example ab
- example bmask
- only attributes with the given bit in the mask set are used within the distance calculation (first attribute corresponds to lowest significant bit)
public static com.rapidminer.operator.meta.ParameterSet combineParameterSets(com.rapidminer.operator.meta.ParameterSet p1, com.rapidminer.operator.meta.ParameterSet p2, com.rapidminer.operator.performance.PerformanceVector pv)
p1
- parameter set 1p2
- parameter set 1pv
- the performance of the new parameter set
public static <T extends com.rapidminer.operator.IOObject> T read(java.lang.String name, java.lang.Class<T> clazz) throws java.io.IOException
name
- clazz
-
java.io.IOException
public static <T extends com.rapidminer.operator.IOObject> T readFromResource(java.lang.String resourcePath, java.lang.Class<T> clazz) throws java.io.IOException
resourcePath
- the resource locationclazz
- the desired class of the IOObject
java.io.IOException
public static <T extends com.rapidminer.operator.IOObject> T readFromFile(java.lang.String filePath, java.lang.Class<T> clazz) throws java.io.IOException
name
- the resource locationclazz
- the desired class of the IOObject
java.io.IOException
public static void write(java.lang.String name, com.rapidminer.operator.IOObject object) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public static java.io.InputStream getStream(java.lang.String name) throws java.io.IOException, com.rapidminer.tools.XMLException
java.io.IOException
com.rapidminer.tools.XMLException
public static java.io.InputStream getStreamFromResource(java.lang.String resourcePath) throws java.io.IOException, com.rapidminer.tools.XMLException
java.io.IOException
com.rapidminer.tools.XMLException
public static java.io.InputStream getStreamFromFile(java.lang.String filePath) throws java.io.IOException, com.rapidminer.tools.XMLException
java.io.IOException
com.rapidminer.tools.XMLException
public static void writeToRepository(com.rapidminer.operator.IOObject object, java.lang.String location) throws com.rapidminer.operator.OperatorCreationException, com.rapidminer.operator.OperatorException
com.rapidminer.operator.OperatorCreationException
com.rapidminer.operator.OperatorException
public static <T extends com.rapidminer.operator.IOObject> T readFromRepository(java.lang.String location, java.lang.Class<T> clazz) throws com.rapidminer.operator.OperatorCreationException, com.rapidminer.operator.OperatorException
com.rapidminer.operator.OperatorCreationException
com.rapidminer.operator.OperatorException
public static java.lang.String readFileAsString(java.lang.String filePath) throws java.io.IOException
java.io.IOException
public static com.rapidminer.example.ExampleSet mergeExampleSets(com.rapidminer.example.ExampleSet a, com.rapidminer.example.ExampleSet b) throws com.rapidminer.operator.OperatorCreationException, com.rapidminer.operator.OperatorException
com.rapidminer.operator.OperatorCreationException
com.rapidminer.operator.OperatorException
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |