package sklearn

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Kernels.HyperparameterSource

Sourcetype tag = [
  1. | `Hyperparameter
]
Sourcetype t = [ `Hyperparameter | `Object ] Obj.t
Sourceval of_pyobject : Py.Object.t -> t
Sourceval to_pyobject : [> tag ] Obj.t -> Py.Object.t
Sourceval create : ?n_elements:Py.Object.t -> ?fixed:Py.Object.t -> name:Py.Object.t -> value_type:Py.Object.t -> bounds:Py.Object.t -> unit -> t

A kernel hyperparameter's specification in form of a namedtuple.

.. versionadded:: 0.18

Attributes ---------- name : string The name of the hyperparameter. Note that a kernel using a hyperparameter with name 'x' must have the attributes self.x and self.x_bounds

value_type : string The type of the hyperparameter. Currently, only 'numeric' hyperparameters are supported.

bounds : pair of floats >= 0 or 'fixed' The lower and upper bound on the parameter. If n_elements>1, a pair of 1d array with n_elements each may be given alternatively. If the string 'fixed' is passed as bounds, the hyperparameter's value cannot be changed.

n_elements : int, default=1 The number of elements of the hyperparameter value. Defaults to 1, which corresponds to a scalar hyperparameter. n_elements > 1 corresponds to a hyperparameter which is vector-valued, such as, e.g., anisotropic length-scales.

fixed : bool, default: None Whether the value of this hyperparameter is fixed, i.e., cannot be changed during hyperparameter tuning. If None is passed, the 'fixed' is derived based on the given bounds.

Sourceval get_item : key:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Return selfkey.

Sourceval iter : [> tag ] Obj.t -> Dict.t Seq.t

Implement iter(self).

Sourceval count : value:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Return number of occurrences of value.

Sourceval index : ?start:Py.Object.t -> ?stop:Py.Object.t -> value:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Return first index of value.

Raises ValueError if the value is not present.

Sourceval name : t -> string

Attribute name: get value or raise Not_found if None.

Sourceval name_opt : t -> string option

Attribute name: get value as an option.

Sourceval value_type : t -> string

Attribute value_type: get value or raise Not_found if None.

Sourceval value_type_opt : t -> string option

Attribute value_type: get value as an option.

Sourceval bounds : t -> Py.Object.t

Attribute bounds: get value or raise Not_found if None.

Sourceval bounds_opt : t -> Py.Object.t option

Attribute bounds: get value as an option.

Sourceval n_elements : t -> int

Attribute n_elements: get value or raise Not_found if None.

Sourceval n_elements_opt : t -> int option

Attribute n_elements: get value as an option.

Sourceval fixed : t -> bool

Attribute fixed: get value or raise Not_found if None.

Sourceval fixed_opt : t -> bool option

Attribute fixed: get value as an option.

Sourceval to_string : t -> string

Print the object to a human-readable representation.

Sourceval show : t -> string

Print the object to a human-readable representation.

Sourceval pp : Format.formatter -> t -> unit

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.