chainer_chemistry.dataset.indexer.BaseFeatureIndexer

class chainer_chemistry.dataset.indexer.BaseFeatureIndexer(dataset)[source]

Base class for FeatureIndexer

FeatureIndexer can be accessed by 2-dimensional indices, axis=0 is used for dataset index and axis=1 is used for feature index. For example, let features be the instance of BaseFeatureIndexer, then features[i, j] returns i-th dataset of j-th feature.

features[ind] works same with features[ind, :]

Note that the returned value will be numpy array, even though the dataset is initilized with other format (e.g. list).

__init__(dataset)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(dataset) Initialize self.
check_type_feature_index(j)
create_feature_index_list(feature_index)
extract_feature(i, j) Extracts i-th data’s j-th feature
extract_feature_by_slice(slice_index, j) Extracts slice_index-th data’s j-th feature.
features_length() Returns length of features
postprocess(item)
preprocess(item)

Attributes

dataset_length
shape