The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"ModelWriter: XML file"
nicugeorgian
Member Posts: 31 Maven
Hi,
Within the training chain of a cross validation process, I have inserted a ModelWriter operator after a learner operator (in my case, W-M5P). The corresponding part of the code looks as follows:
My question is: why I don't get also 10 XML zipped files correspoding to the 10 models? I think that the default value of the parameter output_type of the operator ModelWriter is XML Zipped, right? How can I get the models in the XML (or XML zipped) format?
Thanks,
Geo
Within the training chain of a cross validation process, I have inserted a ModelWriter operator after a learner operator (in my case, W-M5P). The corresponding part of the code looks as follows:
As the cross validation has 10 number_of_validations, the final output consists of 10 file models: model_i.mod, where i = 1,10.
<operator name="XValidation" class="XValidation" expanded="yes">
<operator name="TrainingChain" class="OperatorChain" expanded="yes">
<operator name="W-M5P" class="W-M5P">
<parameter key="M" value="10.0"/>
<parameter key="R" value="true"/>
<parameter key="keep_example_set" value="true"/>
</operator>
<operator name="ModelWriter" class="ModelWriter">
<parameter key="model_file" value="model_%{a}.mod"/>
</operator>
</operator>
My question is: why I don't get also 10 XML zipped files correspoding to the 10 models? I think that the default value of the parameter output_type of the operator ModelWriter is XML Zipped, right? How can I get the models in the XML (or XML zipped) format?
Thanks,
Geo
Tagged:
0
Answers
ahem, I am not sure if I get your point. The created models "model_i.mod" actually are zipped XML files. Just rename them to model_i.zip and you will be able to unzip them.
Cheers,
Ingo
many thanks for the answer.
I have renamed the mod files to zip files, but I was not able to unzip them. Anyway, I ran again the process, this time asking the ModelWriter to yield xml files as opposed to zipped xml files. And yes, I was I able to open them as xml files.
They, however, do not looas as I expected In my case, the learner, W-M5P, yields a regression tree. I was expecting to see only the regression tree in the file returned by ModelWriter. There is, however, a plenty of other information in this model file
Is there a way to get an xml file with the detail of the regression tree only?
Thanks,
Geo
the reason why it did not work with the zip files probably is that the files are actually zipped using gzip, so renaming them to "gz" and using a unzipper which is able to unzip them should work. Try a ResultWriter: This will produce files with exactly the same output as the text view.
Cheers,
Ingo
I now have to find a way to parse such a file / or to convert it to an XML file.
Cheers,
Geo