add model output to worksheet - Statistica General Discussion - Statistica - Dell Community

add model output to worksheet

add model output to worksheet

This question is answered

I am fairly new to Statistica and running version 13.

I want to run a model that produces predicted values and then add these predicted values to the spreadsheet used to generate the model. As far as I can tell, I need to save the model in "code generator in PMML format and then use "Rapid Deployment" to get this back out into the worksheet.

Is this the easiest way to do this?

When I try to do that, I can generate PMML code, but when I try to save this, it gives me the option of saving as Statistica workbook files (stw) or web-format (htm), but does not give me the option of xml format, which is what the quick deployment needs. 

What am I doing wrong? 

Thanks!

Rick

Verified Answer
All Replies
  • Hi Rick

    A big welcome to Statistica! Which analysis module are you using? To get predicted value for your training data(spreadsheet used to the generate the model), you can request them directly in the results dialog for most modules. For instance, here below is the results dialog from logistic regression, click Resid.2|Save predicted, you will be prompted with a dialog to select input variables that you want to save along with the predicted value. For different modules, predicted value may be requested under different tabs. To learn about explanations of each option in any analysis/result dialog, simply click "?" on top right of that dialog to access the e-manual.

    Generally speaking, using Rapid Deployment to deploy PMML code from the trained model is the easiest way to get prediction for any new data(testing set). But you can use it for training data prediction as well. You can check this KB article about How to deploy a PMML script of a data miner model through Rapid Deployment node in workspace? I would recommend you to try "Save Item As" when the PMML code file is active.

    Since you are new to Statistica, I would like to introduce you about How to get support through the Dell Support Portal and Statistica self help tool

  • Thanks for the reply.  I was not familiar with the support portal, and so let me know if you would prefer I work through that.

    I am using the GLZ model, and did see the "Save Predicted" option, but this seems to put the "predicted values" into a new workbook, not back on the existing workbook. I am hoping to automate the running of this model on many different variable selections, and I just want a way to capture and store the predicted values from the multiple runs.  When I attempt to save the predicted values my only options are individual Statistica files or HTM files, which are not convenient for automatically collecting the stored information. Is there no other way to capture this information?  Neither format is convenient for grabbing the model outputs and using outside of Statistica.

    I did review the link on using PMML script... this is where I see the suggestion to store the PMML script in XML format.  I will repeat that this is not an option when using "code generator" within the GLZ model.  My only options are as a statistca file or as an htm file, neither of which are readable by the rapid deployment module.  This seems a bit mystifying to me, and not consistent with what is implied by the documentation.

    Thanks for your help.

    Rick

  • GLZ_Example.sdm

    You are welcome! We would be happy to assist you through either way, support portal or online forum. By using support portal, you will have direct contact with one of support engineers and can track all service requests you will open. It might be a better platform to track complex issues.

    Back to your question, can you try "Save Item As" then the XML file will appear?

    If you want to set up many analysis runs that only differ in variable selection, I would recommend you to use workspace which provides a platform to build your work flow from input data to output results. Here attach is an example. If you have further questions regarding  how this is set up, please open a service request so that I can schedule an online demo meeting with you. 

  • Thanks, I see that "Save as Item" now.  I was closing the code window and then responding to the "do you want to save?"  query, which only provided "Save" or "Save As" options.  This does work, but I note that the VBA record macro does not record the "save as item" command. I was hoping to record the whole process in VBA and then spin through my various scenarios automatically, but I don't know how the correct VBA protocol for saving the PMML as and XML file.

    I am interested in understanding how the "workspace" works, and will try to set something up.

  • I, too, would be interested in how to do either one of these options for C&RT analysis.  If you could show me how to connect a C&RT workspace node to a downstream PMML Model node or how to code the "show item as" into a macro, that would be great.  Thanks!

  • Itree-ModelDeployment.sdm

    Hi, Johnshi1

    I have created a KB article that shows how to generate and deploy advanced I-tree analysis PMML model and deploy it. 

    You can also refer to attached workspace for an example of C&RT classification analysis workspace with PMML model generated and deployed using "Rapid Deployment" node.

    Thank you. 

  • This is perfect.  Exactly what I was looking for!  Thanks!

  • Hi, JohnSH1,

    You are most welcome :)