extractParams: Put passed parameters into one list

Description Usage Arguments Value Examples

View source: R/runSaviHelperFunctions.R

Description

This is a helper function that is used in runSavi which is not meant for the user.

Usage

1
extractParams(coolingScheduleType, coolingScheduleParams)

Arguments

coolingScheduleType

The type of cooling schedule used which can be customized by using the parameter "coolingScheduleParams." There are currently 4 options. The argument "Greedy" implements an algorithm which only moves to a lower (or possibly equal) score. The argument "Log" implements a schedule that cools based on a logarithmic function. The argument "Step" implements a schedule that follows a step function. Finally, the arguement "Adaptive" will implement a cooling schedule that automatically determines when to lower the temperature based on the previous scores.

coolingScheduleParams

A vector of parameters that should be based on the coolingScheduleType chosen. For "Greedy," pass the number of iterations to use. For "Log," pass the number of iterations to use, the alpha constant, and the beta constant. Note both alpha and beta must be greater than 0. For "Step," pass the total number of iterations to run, the initial temperature, the number of iterations to run before moving down a step, and the percent to step down with. Note, the percent to step down with must be in the interval (0,1). For "Adaptive," pass the total number of iterations to run, the initial temperature, the number of iterations to run before checking to lower the temperature, the percent to step down with, and the threshold of the difference in scores for the temperature to lower. Note that the number of iterations to run before checking to lower the temperature must be an even integer. Further, the percent to step down with must be in the interval (0,1).

Value

A list of all parameters

Examples

1
2
3
4
    extractParams("Greedy",10000)
    extractParams("Log",c(10000,1,1))
    extractParams("Step",c(10000,20,1000,0.8))
    extractParams("Adaptive",c(10000,100,100,0.8,0))

nsimone101/savi documentation built on July 1, 2020, 4:53 a.m.