physbo.variable module

class physbo.variable.variable(X=None, t=None, Z=None)[ソース]

ベースクラス: object

add(X=None, t=None, Z=None)[ソース]

Adding variables of X, t, Z.

パラメータ:
  • 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)[ソース]

Adding variable X. If self.X is None, self.X is set as X.

パラメータ:X (numpy array) -- N x d dimensional matrix. Each row of X denotes the d-dimensional feature vector of each search candidate.
add_Z(Z=None)[ソース]

Adding variable Z. If self.Z is None, self.Z is set as Z.

パラメータ:Z --
add_t(t=None)[ソース]

Adding variable t. If self.t is None, self.t is set as t.

パラメータ:t (numpy array) -- N dimensional array. The negative energy of each search candidate (value of the objective function to be optimized).
delete(num_row)[ソース]

Deleting variables of X, t, Z whose indexes are specified by num_row.

パラメータ:num_row (numpy array) -- Index array to be deleted.
delete_X(num_row)[ソース]

Deleting variables of X whose indexes are specified by num_row.

パラメータ:num_row (numpy array) -- Index array to be deleted.
delete_Z(num_row)[ソース]

Deleting variables of Z whose indexes are specified by num_row.

パラメータ:num_row (numpy array) -- Index array to be deleted.
delete_t(num_row)[ソース]

Deleting variables of t whose indexes are specified by num_row.

パラメータ:num_row (numpy array) -- Index array to be deleted.
get_subset(index)[ソース]

Getting subset of variables.

パラメータ:index (int or array of int) -- Index of selected action.
戻り値:variable
戻り値の型:physbo.variable
load(file_name)[ソース]

Loading variables X, t, Z from the file.

パラメータ:file_name (str) -- A file name for loading variables X, t, Z using numpy.load.
save(file_name)[ソース]

Saving variables X, t, Z to the file.

パラメータ:file_name (str) -- A file name for saving variables X, t, Z using numpy.savez_compressed.