You are viewing the RapidMiner Studio documentation for version 8.1 - Check here for latest version
Write as Text (RapidMiner Studio Core)
SynopsisThis operator writes the given results to the specified file. This operator can be used at each point in an operator chain to write results at every step of the process into a file.
The Write as Text operator writes the given results to the specified file. The file is specified through the result file parameter. This operator does not modify the results; it just writes them to the file and then delivers the unchanged results through its output ports. Every input object which implements the ResultObject interface (which is the case for almost all objects generated by the core RapidMiner operators) will write its results to the file specified by the result file parameter. If the result file parameter is not set then the global result file parameter with the same name of the ProcessRootOperator (the root of the process) will be used. If this file is also not specified then the results are simply written to the console (standard out).
- input (IOObject)
Any results connected at this port are written to the specified file and then delivered without any modifications to the output port. This operator can have multiple inputs. When one input is connected, another input port becomes available which is ready to accept another input (if any). The order of inputs remains the same. The result supplied at the first input port of the Write as Text operator is available at its first output port.
- input (IOObject)
The results that were given as input are passed without changing to the output through this port. It is not compulsory to attach this port to any other port, the results are written into the file even if this port is left without connections. The Write as Text operator can have multiple outputs. When one output is connected, another output port becomes available which is ready to deliver another output (if any). The order of outputs remains the same. The result connected at the first input port of the Write as Text operator is delivered through the first output port
- result_fileThe results are written into the file specified through this parameter. Range: filename
- encodingThis is an expert parameter. There are different options, users can choose any of them Range: selection
Writing multiple results into a file
The 'Golf' data set is loaded using the Retrieve operator. The Split Validation operator is applied on it with default values of all parameters. The Default Model operator trains a model on the 'Golf' data set in the training subprocess. The trained model is applied on the testing data set in the testing subprocess by the Apply Model operator. The Performance operator measures the performance of the model. The Split Validation operator delivers multiple results i.e. a trained model, the input ExampleSet and the performance vector. All these results are connected to the Write as Text operator to write them into a file. The result file parameter is set to 'D:\results.txt', thus a text file named 'results' is created in the D drive of the computer. If the file already exists then the results are appended to the file. The results are written into the specified file but they are not as detailed as the results in the Results Workspace.