Aggregate command

The aggregate command joins data from multiple models. The models can either be precomputed data or trained ACP or CCP models. Aggregate is used for a high level way of distributing or running training in parallel, by first precomputing the signatures discriptors and creating a sparse dataset. Then train can be runned in parallel for however many ICPs that you wish to use in the final Aggaregated Conformal Predictor. Once all ICPs has been trained, aggragate will combine the models into the final ACP model.

Parameters

The full usage menu can be retrieved by running command:

> java -jar cpsign-[version].jar aggregate -h

                                          aggregate
SYNOPSIS
----------------------------------------------------------------------------------------------------
   aggregate [options]
   aggregate @/tmp/runconfigs/parameters.txt [options]
   aggregate @C:\Users\User\runconfigs\parameters.txt [options]


DESCRIPTION
----------------------------------------------------------------------------------------------------
   The aggregate command joins data from multiple models. The models can either be precomputed data
   generated by the 'precompute' command or trained ACP or CCP models generated by the 'train'
   command. This command facilitate a high level way of distributing the training step.


OPTIONS
----------------------------------------------------------------------------------------------------
   Input options:
    * -m, --modelfiles  [([URI] or [path]) ([URI] or [path])] or [([URI] or [path]),([URI] or [path])]
         A list of models that should be aggregated (space or comma-separated list of URIs or
         filepaths). Note that models can be a mix of non-compressed, compressed and encrypted models.
      -mt, --model-type  [integer]
         Model type: 1) precomputed classification data, 2) precomputed regression data, 3) trained
         classification models, 4) trained regression models
         Default: 4
      -af, --accept-fail
         Accept failure if a model cannot be added to the aggregated model (i.e. if model is of wrong
         type, does not have matching signatures, cannot be decrypted etc.). Default is to fail
         execution
         Default: false

   Output options:
    * -mo, --model-out  [path]
         Model file to generate. Either give a fully specified file including a valid file suffix
         (.cpsign, .jar) or a directory where the model should be generated (cpsign will create a
         unique file name for you)
    * -mn, --model-name  [text]
         Model name for the OSGi plugin
      -mc, --model-category  [text]
         The category of the model, will end up as model-endpoint in the OSGi
      -mv, --model-version  [text]
         Optional model version in SemVer versioning format
         Default: 1.0.0_2017-10-09_13:51:53.029

   Encryption options:
      --encrypt  [path]
         Path to the license file that the aggregated model should be encrypted for (can be the same
         as passed to --license). If any of the models to aggregate is encrypted, this license must be
         the one used for encrypting those models
      --two-factor-pin
         If two-factor encryption is used and key has a non-default PIN

   General options:
    * --license  [path]
         Path to license file
      --logfile  [path]
         Path to a user set logfile, will be specific for this run
      --silent
         Silent mode (only print output to logfile)
         Default: false
      --echo
         Echo the input arguments given to CPSign
         Default: false
      -h, --help
         Get help for this command
         Default: false
      --time
         Print wall-time for all individual steps in execution
         Default: false

Example usage

> java -jar cpsign-[version].jar aggregate \
   --license /path/to/Standard-license.license \
   -m \
   models/acp_model_reg_1.cpsign \
   models/acp_model_reg_2.cpsign \
   models/acp_model_reg_3.cpsign \
   models/acp_model_reg_4.cpsign \
   --model-out \
   /tmp/aggregated_reg.cpsign \
   --model-name \
   Aggregated_chang \
   --compress

Running with Standard license: License registered to: [Name] [Company]. Expiry date is: [Date]

Aggregating regression models..
Loading model from file..
 - Loaded model 1/5
 - Loaded model 2/5
 - Loaded model 3/5
 - Loaded model 4/5
 - Loaded model 5/5
 - Aggreageted model 1/4
Loading model from file..
 - Loaded model 1/5
 - Loaded model 2/5
 - Loaded model 3/5
 - Loaded model 4/5
 - Loaded model 5/5
 - Aggreageted model 2/4
Loading model from file..
 - Loaded model 1/5
 - Loaded model 2/5
 - Loaded model 3/5
 - Loaded model 4/5
 - Loaded model 5/5
 - Aggreageted model 3/4
Loading model from file..
 - Loaded model 1/5
 - Loaded model 2/5
 - Loaded model 3/5
 - Loaded model 4/5
 - Loaded model 5/5
 - Aggreageted model 4/4

Successfully aggregated 4 trained regression models (in total 20 ICPs)

Saving aggregated model to file..
Packaged model file: /tmp/aggregated_reg.cpsign