package sklearn

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val of_pyobject : Py.Object.t -> t
val to_pyobject : t -> Py.Object.t
val 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.

val get_item : key:Py.Object.t -> t -> Py.Object.t

Return selfkey.

val count : value:Py.Object.t -> t -> Py.Object.t

Return number of occurrences of value.

val index : ?start:Py.Object.t -> ?stop:Py.Object.t -> value:Py.Object.t -> t -> Py.Object.t

Return first index of value.

Raises ValueError if the value is not present.

val name : t -> string

Attribute name: get value or raise Not_found if None.

val name_opt : t -> string option

Attribute name: get value as an option.

val value_type : t -> string

Attribute value_type: get value or raise Not_found if None.

val value_type_opt : t -> string option

Attribute value_type: get value as an option.

val bounds : t -> Py.Object.t

Attribute bounds: get value or raise Not_found if None.

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

Attribute bounds: get value as an option.

val n_elements : t -> int

Attribute n_elements: get value or raise Not_found if None.

val n_elements_opt : t -> int option

Attribute n_elements: get value as an option.

val fixed : t -> bool

Attribute fixed: get value or raise Not_found if None.

val fixed_opt : t -> bool option

Attribute fixed: get value as an option.

val to_string : t -> string

Print the object to a human-readable representation.

val show : t -> string

Print the object to a human-readable representation.

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

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.