"read multiple files from XML file"
asiulana
New Altair Community Member
Hello!
I came a cross a problem which is I have to run one XML file and it reads the data from an AML file (using the operator example source) but I have 36 AML files to read the data from so until now have been copying and pasting the XML files (36 files in all) and just changing the name of the of the AML files.
By reading the rapidminer manual i get the feeling I can pass a file with the names of all the AML files to read from, but i'm not sure how to do it???
Can anyone give me some help please??
Thanks in advance =P
All the best
Ana Luisa
I came a cross a problem which is I have to run one XML file and it reads the data from an AML file (using the operator example source) but I have 36 AML files to read the data from so until now have been copying and pasting the XML files (36 files in all) and just changing the name of the of the AML files.
By reading the rapidminer manual i get the feeling I can pass a file with the names of all the AML files to read from, but i'm not sure how to do it???
Can anyone give me some help please??
Thanks in advance =P
All the best
Ana Luisa
0
Answers
-
Hi Ana Luisa
if you check out the developer version of RapidMiner in the Zaniah branch, you could use the new Directory Iterator Operator. This will set a macro for every file within a directory. The macro might be used to specify the file within an ExampleSetReader.
Another macro might be used to write results into files: The %{a} macro specifies the apply count of any operator. The process will look like this:<operator name="Root" class="Process" expanded="yes">
Hope that will help you.
<operator name="DirectoryIterator" class="DirectoryIterator" expanded="yes">
<parameter key="directory" value="/user/land"/>
<parameter key="file_name_macro" value="fileName"/>
<operator name="ExampleSource" class="ExampleSource">
<parameter key="attributes" value="%{fileName}"/>
</operator>
<operator name="AttributeSubsetPreprocessing" class="AttributeSubsetPreprocessing" expanded="yes">
<parameter key="attribute_name_regex" value="label"/>
<parameter key="condition_class" value="is_nominal"/>
<parameter key="process_special_attributes" value="true"/>
<operator name="NominalNumbers2Numerical" class="NominalNumbers2Numerical">
</operator>
</operator>
<operator name="LibSVMLearner" class="LibSVMLearner">
<parameter key="C" value="100.0"/>
<parameter key="gamma" value="0.1"/>
<parameter key="keep_example_set" value="true"/>
<parameter key="svm_type" value="nu-SVR"/>
</operator>
<operator name="ModelWriter" class="ModelWriter">
<parameter key="model_file" value="/Users/land/Model%{a}.mod"/>
</operator>
</operator>
</operator>
Greetings,
Sebastian0 -
Hello Sebastian!
Thank you, yes it helped a lot.
I don't know if i have to create a new post about what i'm going to ask, but here it goes.
Do you have in the 4.3 version of RM more similarity measures for k-NN?? (http://rapid-i.com/rapidforum/index.php/topic,131.msg488.html#msg488)
I don't seem to find the parameter refering to similarities measures , what is the parameter ?
I can only see measure_types and mixed_measure(only have misex euclideandistance).
All the best
ana luisa0 -
HI Ana Luisa,
there is an abundance of distance measures available. That's why we have divided them into 4 groups:- Nominal
- Numerical
- Mixed (what is the default selection)
- Bregman Divergences
Greetings,
Sebastian0