physbo.variable module¶
-
class
physbo.variable.
variable
(X=None, t=None, Z=None)[source]¶ Bases:
object
-
add
(X=None, t=None, Z=None)[source]¶ Adding variables of X, t, Z.
- Parameters
X (numpy array) – N x d dimensional matrix. Each row of X denotes the d-dimensional feature vector of each search candidate.
t (numpy array) – N dimensional array. The negative energy of each search candidate (value of the objective function to be optimized).
Z –
-
add_X
(X=None)[source]¶ Adding variable X. If self.X is None, self.X is set as X.
- Parameters
X (numpy array) – N x d dimensional matrix. Each row of X denotes the d-dimensional feature vector of each search candidate.
-
add_t
(t=None)[source]¶ Adding variable t. If self.t is None, self.t is set as t.
- Parameters
t (numpy array) – N dimensional array. The negative energy of each search candidate (value of the objective function to be optimized).
-
delete
(num_row)[source]¶ Deleting variables of X, t, Z whose indexes are specified by num_row.
- Parameters
num_row (numpy array) – Index array to be deleted.
-
delete_X
(num_row)[source]¶ Deleting variables of X whose indexes are specified by num_row.
- Parameters
num_row (numpy array) – Index array to be deleted.
-
delete_Z
(num_row)[source]¶ Deleting variables of Z whose indexes are specified by num_row.
- Parameters
num_row (numpy array) – Index array to be deleted.
-
delete_t
(num_row)[source]¶ Deleting variables of t whose indexes are specified by num_row.
- Parameters
num_row (numpy array) – Index array to be deleted.
-
get_subset
(index)[source]¶ Getting subset of variables.
- Parameters
index (int or array of int) – Index of selected action.
- Returns
variable
- Return type
physbo.variable
-