0 / 0
Building and deploying the model (SPSS Modeler)

Building and deploying the model

Once you finish tuning the extraction process, you can generate a category model from the customizations and the categories that you built.

  1. Click Generate a model to generate a category model.
    Figure 1. Generate a new model
    Image showing the button for Generate a model.
    Figure 2. Build a category model
    Generate category model dialog. The dialog says "This will create a category model with your current settings and export it to your Modeler flow. Do you want to generate the model?" One of the buttons in the dialog says Build.
  2. If you want to save the Text Analytics Workbench session, click Return to flow and then Save and exit.
    Figure 3. Saving your session
    Save and exit dialog. The dialog asks if you want to save your changes to the Text Mining node in your flow.
    The generated category model nugget appears on your flow canvas.
    Figure 4. Generated category model nugget
    Generated category model nugget. Shows a flow with a Text Mining node and a category model nugget.
    After the category model has been validated and generated in the Text Analytics Workbench, you can deploy it in your flow and score the same data set or score a new one.
    Figure 5. Example flow with two modes for scoring
    Example flow with two modes for scoring
    This example flow illustrates the two modes for scoring:
    • Categories as fields. With this option, there are just as many output records as there were in the input. However, each record now contains one new field for every category that was selected on the Model tab. For each field, enter a flag value for true and for false, such as True/False, or 1/0. In this flow, values are set to 1 and 0 to aggregate results and count the number of positive, negative, mixed (both positive and negative), or no score (no opinion) answers.
      Figure 6. Model results - categories as fields
      Model results - categories as fields. It is a table with the columns ID, Comments, Gender, Reason, Neg, Pos, Cont, and Sentiment. Entries for the ID column are numbers. Entries for the Comments column show short phrases extracted from the text. For example, one entry says very quiet, but very expensive. Entries for the Reason column show if the trip was for business or leisure. Neg and Pos show a count of negative and positive sentiments for each short phrase. Sentiment shows whether the review was positive (only numbers in the Pos column), negative (only numbers in the Neg column), or mixed (numbers in both the Neg and Pos columns).
    • Categories as records. With this option, a new record is created for each category, document pair. Typically, there are more records in the output than there were in the input. Along with the input fields, new fields are also added to the data depending on what kind of model it is.
      Figure 7. Model results - categories as records
      Model results - categories as records. It is a table with the columns ID, Comments, Gender, Reason, Category, and Sentiment. Entries for the ID column are numbers. Entries for the Comments column show short phrases extracted from the text. For example, one entry says very quiet, but very expensive. Entries for the Reason column show if the trip was for business or leisure. Neg and Pos show a count of negative and positive sentiments for each short phrase. Sentiment shows whether the review was positive (only numbers in the Pos column), negative (only numbers in the Neg column), or mixed (numbers in both the Neg and Pos columns).
  3. You can add a Select node after the DeriveSentiment SuperNode, set include Sentiments=Pos, and add a Charts node to gain quick insight about what guests appreciate about the hotel:
    Figure 8. Chart of positive opinions
    Chart of positive opinions. It shows terms and phrases, such as location, budget, and hotel amenities. These terms are varying sizes depending on their importance. They arranged the central most important term which is in the center and is the biggest.
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more