com.rapidminer.operator.meta
Class ParameterSet

java.lang.Object
  extended by com.rapidminer.operator.AbstractIOObject
      extended by com.rapidminer.operator.ResultObjectAdapter
          extended by com.rapidminer.operator.meta.ParameterSet
All Implemented Interfaces:
IOObject, ResultObject, Saveable, LoggingHandler, java.io.Serializable

public class ParameterSet
extends ResultObjectAdapter

A set of parameters generated by a ParameterOptimizationOperator.

Author:
Simon Fischer, Ingo Mierswa
See Also:
Serialized Form

Constructor Summary
ParameterSet(Operator[] operators, java.lang.String[] parameters, java.lang.String[] values, PerformanceVector value)
          Constructs a new ParameterSet.
 
Method Summary
 void applyAll(Process process, java.util.Map<java.lang.String,java.lang.String> nameMap)
          Applies all parameters in the set to their operators.
 java.lang.String getExtension()
          Returns the default extension in file choosers.
 java.lang.String getFileDescription()
          Returns the file description used in file choosers.
 java.lang.String getName()
          The default implementation returns the classname without package.
 java.util.Iterator<ParameterValue> getParameterValues()
           
 PerformanceVector getPerformance()
          Returns the performance of this parameter set.
 javax.swing.Icon getResultIcon()
          Returns null.
static ParameterSet readParameterSet(java.io.InputStream in)
          Reads a parameter set from a file.
 void save(java.io.File file)
          Saves the object into the given file by using the AbstractIOObject.write(OutputStream) method of IOObject (XML format).
 java.lang.String toString()
           
 void writeParameterSet(java.io.PrintWriter out, java.nio.charset.Charset encoding)
           
 
Methods inherited from class com.rapidminer.operator.ResultObjectAdapter
addAction, getActions, getVisualizationComponent, isSavable, log, logError, logNote, logWarning, toHTML, toResultString
 
Methods inherited from class com.rapidminer.operator.AbstractIOObject
copy, getLog, getSource, initWriting, read, setLoggingHandler, setSource, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rapidminer.operator.IOObject
copy, getLog, getSource, setLoggingHandler, setSource, write
 

Constructor Detail

ParameterSet

public ParameterSet(Operator[] operators,
                    java.lang.String[] parameters,
                    java.lang.String[] values,
                    PerformanceVector value)
Constructs a new ParameterSet. The three arrays must have equal length. For each i, the ParameterSet specifies the value values[i] for the parameter parameters[i] of the operator named operators[i].

Method Detail

getName

public java.lang.String getName()
Description copied from class: ResultObjectAdapter
The default implementation returns the classname without package.

Specified by:
getName in interface ResultObject
Overrides:
getName in class ResultObjectAdapter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPerformance

public PerformanceVector getPerformance()
Returns the performance of this parameter set. Attension: This may be null if the ParameterSet was read from a file.


applyAll

public void applyAll(Process process,
                     java.util.Map<java.lang.String,java.lang.String> nameMap)
Applies all parameters in the set to their operators. The entries in the nameMap can be used if the names of the operators in two processes (one parameter optimization process and one application process) are not the same. Each entry in nameMap maps the name read from the file to the name of the operator in the process definition.


save

public void save(java.io.File file)
          throws java.io.IOException
Description copied from class: ResultObjectAdapter
Saves the object into the given file by using the AbstractIOObject.write(OutputStream) method of IOObject (XML format).

Specified by:
save in interface Saveable
Overrides:
save in class ResultObjectAdapter
Throws:
java.io.IOException

getExtension

public java.lang.String getExtension()
Description copied from interface: Saveable
Returns the default extension in file choosers.


getFileDescription

public java.lang.String getFileDescription()
Description copied from interface: Saveable
Returns the file description used in file choosers.


getParameterValues

public java.util.Iterator<ParameterValue> getParameterValues()

writeParameterSet

public void writeParameterSet(java.io.PrintWriter out,
                              java.nio.charset.Charset encoding)

readParameterSet

public static ParameterSet readParameterSet(java.io.InputStream in)
                                     throws java.io.IOException
Reads a parameter set from a file.

Throws:
java.io.IOException

getResultIcon

public javax.swing.Icon getResultIcon()
Description copied from class: ResultObjectAdapter
Returns null. Subclasses might want to override this method and returns an appropriate icon.

Specified by:
getResultIcon in interface ResultObject
Overrides:
getResultIcon in class ResultObjectAdapter


Copyright © 2001-2009 by Rapid-I