# Setup a Parameter Search Test

Note: A previously configured and saved Parameter Search Data XML file can be loaded and used as the basis for a new test by pressing the Load button.

1. From the Workspace drop-down, select the workspace to load. The loaded workspace will contain all of the configured streams and tools in that workspace.

   Note: The utility automatically points to the directory where your ViDi workspaces are stored. If you want to use a different workspace from another directory, press the Import button to load that workspace.
2. From the Stream drop-down, select the stream you want to test.
3. From the Tool, select the tool.
4. In the table, select the parameter to test. Click the Parameter field, which will initiate a drop-down menu, where you can scroll through the full list of tool parameters.
5. Check the Process Only checkbox, which is disabled by default, if you only want to vary the processing parameters, while keeping the training parameters the same over multiple iterations.

6. In the Values field, enter the parameter value combinations to test.

   Note:
   - To enter additional parameters, press Enter after adding the Values.
   - If after entering the value the Values field is outlined in red, there is an error in the syntax.

   Parameter | Tool | Data Type | Example
   --- | --- | --- | ---
   AspectRatio | All | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage. If you want to test 0%, 2% and 5%, you would enter: 0 2 5
   BorderType | All | Enum: Black White Reflect Wrap Replicate | The syntax is the name of the parameter setting. If you want to test Black and Replicate, you would enter: Black Replicate
   Capacity | Red Analyze - Unsupervised Mode | Enum: Huge Large Medium Small Tiny | The syntax is the name of the parameter setting.
   Centered | Red Analyze | Boolean | The syntax is the Boolean state, True or False. If you want to test the two states, enter: True False
   ColorChannels | All | Int32 | The syntax is a 32-bit integer, 1 through 4. If you want to test greyscale, BGR and BGR(A), enter: 1 3 4
   Contrast | All | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   CountEpochs | All | Int32 | The syntax is a 32-bit integer, 1 through 1000.
   Exclusive | Green Classify | Boolean | The syntax is the Boolean state, True or False.
   FeatureFilter | Blue Locate Blue Read | String | The syntax is a string representing the filter to be used. If you want to filter out features whose center is within the ROI, enter: x in [0,width] and y in [0,height]
   FeatureSize | All | Size | If you want to test combinations of 90, 100, 110, you would enter: 90x90 100x100 110x110
   Flip | All | Enum: None Horizontal Vertical Both | The syntax is the name of the parameter setting.
   GenerateLowPrecisionModel | Green Classify Red Analyze | Boolean | The syntax is the Boolean state, True or False.
   InvertContrast | All | Boolean | The syntax is the Boolean state, True or False.
   KeepTrainSelection | All | Boolean | The syntax is the Boolean state, True or False.
   LowPrecision | Green Classify Red Analyze | Boolean | The syntax is the Boolean state, True or False.
   Luminance | All | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   MaskingMode | All | Enum: Transparent Mask Overlay | The syntax is the name of the parameter setting.
   OrientedFeatures | Blue Locate Blue Read | Boolean | The syntax is the Boolean state, True or False.
   Precision | Blue Locate | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   RegionFilter | Red Analyze | String | The syntax is a string representing the filter to be used.
   Rotation | All | List of intervals | The syntax is [low,high], where "low" and "high" are numbers. To enter a series of intervals, separate the values within the brackets with a space. If you wanted to test rotation intervals of (0°, 90°), (5°, 110°) and (-5°, -90°) you would enter: [0,90] [5,110] [-5,-90]
   SamplingDensity | All | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   SamplingIterations | Red Analyze | Int32 | The syntax is a 32-bit integer, 1 through 10.
   Scale | All | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   ScaledFeatures | Blue Locate Blue Read | Boolean | The syntax is the Boolean state, True or False.
   Shear | All | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   SimpleRegions | Red Analyze | Boolean | The syntax is the Boolean state, True or False.
   Threshold | All | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   TrainingPasses | Red Analyze - Unsupervised Mode | Int32 | The syntax is a 32-bit integer, 1 through 3.
   TrainSelection | All | Double | The syntax is a number, 0 to 100 (where 0 = off), which will be displayed as a percentage.
   UseBaseline | Red Analyze | Boolean | The syntax is the Boolean state, True or False.

7. In the Runs field, enter the number of iterations to perform. Multiple iterations will provide more statistical analysis, such as the mean, median and standard deviation, but will also require more time to execute.
8. Check the Reset checkbox, which is disabled by default, if you want to reset (i.e. un-train) the tool between train/process cycles.
9. Leave the Keep Train Selection checkbox enabled if you do not want the split between the Train Selection parameter to change. Otherwise, disable the checkbox.
10. Check the Save Tools checkbox, which is disabled by default, if you want to export the tool to the directory containing the Parameter Search experiment file.
11. The Filter field is used to create Display Filters. By default, it is set to not trained.

12. Press the Init button to initialize the parameter settings, which will then be displayed in the Results table. This will also enable the Start button.

    Note: If you make additional changes to the parameters and their settings, you will need to press the Init button again to update the parameters and values.

13. Press the Save button to save the Parameter Search Data XML file.

    Note: If you have not saved the file, when you press the Start button, you will automatically be prompted to save the Parameter Search Data file.

14. Press the Start button to begin the computation of the parameter settings.

    Once the tests begin to execute, the utility will indicate the time remaining for the test in the lower left corner of the application.

15. Once the test completes, you can review the results to determine the best combination of parameter settings.