On this page:
declare-hyper
declare-hypers
with-hyper
with-hypers
grid-search
hypers
8.12

12 Hyperparameters🔗ℹ

syntax

(declare-hyper h)

syntax

(declare-hypers h ...)

Defines h ... to be hyperparameters. The names h ... and corresponding setter function set-h! ... are automatically provided from the module. The initial values of h ... are undefined.

syntax

(with-hyper ((h v)) expr ...)

syntax

(with-hypers ((h v) ...) expr ...)

Temporarily defines the hyperparameters h ... the value v ... during the evaluation of expr .... When the form returns a value, the hyperparameters are reset to their previous values (which may be undefined). Nested with-hypers forms may be invoked during the invocation of expr to temporarily redefine a given hyperparameter to a new value.

syntax

(grid-search stop? ((h v ...) ...) expr ...)

Like with-hypers, but accepts more than one v for each hyperparameter h. Sequentially evaluates expr ... for each h being assigned a value from v .... All combinations are tried until stop? invoked on the value returned by (begin expr ...) returns #t.

syntax

(hypers h ...)

A provide sub-form that exports the hyperparameters h .... This provide sub-form is only needed when re-exporting hypers imported from other modules. By default, declare-hypers will export the hyper from the module where it was declared.