Skip to content

ssqpy.solvers.search

search

Submodule containing classes related to various types of parameter
searching methods.

DynamicsParamGradientDescent

DynamicsParamGradientDescent(dynamics, min_data_size=100, armijo_beta=0.5, armijo_c1=0.0001)

addData

addData(x, u, x_next)

Adds a new data point
Returns: whether the parameters were updated

clearData

clearData()

Clears all previously added data

setMinimumDataSize

setMinimumDataSize(min_data_size)

Sets the minimum required data size in order to perform an update

DynamicsParamGaussNewton

DynamicsParamGaussNewton(dynamics, window_size=100, armijo_beta=0.5, armijo_c1=0.0001)

addData

addData(x, u, x_next)

Adds a new data point
Returns: whether the parameters were updated

clearData

clearData()

Clears window of all previously added data

setWindowSize

setWindowSize(window_size, prune_last=False)

Sets the window size to the given value
Parameters:

  • window_size: The size to resize the window to
  • prune_last: Whether to remove the most recent data points, in case the window currently holds more data than the provided size; if false, an algorithm is used to instead prune the most similar data points has no effect if the provided size is larger than the data currently held

HyperParamSearch

addHyperparams

addHyperparams(arg)

Adds a set of solver parameters to compare.

addProblem

addProblem(arg)

Adds a problem to solve with each set of parameters.

search

search()

Solves every problem with each set of parameters and returns the set that scores best on iterations, solve time, cost, constraint violation and stage gap.