13 Model Compose
stew-ro редактировал(а) эту страницу 2020-11-19 13:18:48 -08:00

How model compose works?

Model compose allows you to compose a new model from multiple existing models. All existing models used to compose a new model remain unaffected by composing. When analyzing with a composed model, the composed model will choose the most appropriate model to analyze the incoming document.

Real world scenario

You need to process two types of form documents. One type is invoices; the other type is expense reports. Given that you've trained two individual models for each of the document types. You name them "Invoice" and "Expense". Now, when you have thousands of documents of both types to process, how can you classify which document should go with which model? Then, Model Composing can help you. You could compose these two models into one model, called "Composed", and run the following process:

Analyze incoming documents and process them based on the different types:  
Loop through incoming documents 
For each document, call Analyze() on the "Composed" model 
Get analysis result, and retrieve the docType field of the analysis result 
If the docType Field contains “Invoice”, then do Invoice-related processing 
If the docType Field contains “Expense" , do expense-related processing 
End of loop 

Steps to create a composed model

  1. Go to the Model Compose page
    images/Model Compose Page.png

  2. Optionally load more pages of models by clicking the Load next page button at the bottom of the list of models
    images/Load Next Page.png

  3. Select multiple models you want to compose into a new model
    images/Select Multiple Models.png

  4. Click the compose button at the top-left of the page
    images/Click Compose.png

  5. Review the model composition and optionally give the new composed model a name
    images/Model Compose Confirmation.png

  6. Click the compose button on the review view
    images/Click Compose On Compose View.png

Additional details

  • The list of models are initially sorted by their IDs. Loading additional pages of models always appends the next page of models by ID. You can sort and search the currently loaded models by clicking the list headers (e.g. Model name) and using the search bar, but only the currently loaded models are sorted and searched.

  • All composed models have a compose icon to the left of their ID in the list of models, so you can distinguish composed models from your other models
    images/Compose Icon.png

  • You can view the models that make up a composed model's composition by double clicking a composed model from the list of models
    images/Composed Model Info.png

  • You can identify which model was used in analysis, out of the models that make up a composed model, by viewing the model ID in the analysis results