The aggregate program joins data from multiple models. The models can either be precomputed data or trained ACP or CVAP 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 numerical dataset. Then train can be run in parallel for however many ICPs that you wish to use in the final Aggregated Conformal Predictor. Once all ICPs has been trained, aggragate will combine the models into the final ACP model.

Table of Contents


The full usage menu can be retrieved by running command:

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

  * -m  | --modelfiles                       [[URI | path] [URI | path] ..]
       A list (space or comma-separated) of models that should be aggregated. It is
       allowed to give directories, glob patterns (with wildcard characters), explicit
       files or URIs. Note that models can be a mix of non-encrypted and encrypted models.
    -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

    -mo | --model-out                        [path]
       Model file to generate (--model-out or --model-out-dir are required to pass)
    --model-out-dir                          [path]
       Specify a directory where the model should be saved, leave naming to cpsign
       (--model-out or --model-out-dir are required to pass). Specify '.' if model should
       be generated in the current directory.
  * -mn | --model-name                       [text]
       The name of the model
    -mc | --model-category                   [text]
       The category of the model, will end up as model-endpoint in the model JAR
    -mv | --model-version                    [text]
       Optional model version in SemVer versioning format
       Default: 1.0.0_{date time string}

    --encrypt                                [URI | path]
       Path to the license file that the model should be encrypted by (can be the same as
       passed to --license)

  * --license                                [URI | path]
       Path or URI to license file
    -h  | --help | man
       Get help text
       Use shorter help text (used together with the --help argument)
    --logfile                                [path]
       Path to a user-set logfile, will be specific for this run
       Silent mode (only print output to logfile)
       Echo the input arguments given to CPSign
    --seed                                   [integer]
       Set this flag if an explicit RNG seed should be used in tasks that require a RNG
       (randomization of training data, splitting in cross-validation, learning algorithms
       etc). Not used by all programs.
       Add a Progress bar in the system error output
       Add a Progress bar in ASCII in the system error output
       Print wall-time for all individual steps in execution


Example usage

> java -jar cpsign-[version].jar aggregate \
   --license /path/to/Standard-license.license \
   -m \
   models/acp_model_class_1.cpsign \
   models/acp_model_class_2.cpsign \
   --model-out \
   /tmp/acp_classification_aggregated_reg.cpsign \
   --model-name \
   Aggregated classification model

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

Aggregating classification models..
 - Loaded model 1/2
 - Aggregated model 2/2

Successfully aggregated 2 trained classification models (in total 6 ICPs)

Saving aggregated model to file..
Finished model saved at: