12b360c6dae048ae2c1c235884627413c432e530,pyemma/coordinates/transform/vamp.py,VAMPModel,dimension,#VAMPModel#,106

Before Change


                raise RuntimeError("Requested dimension, but the dimension depends on the singular values of C00 and C11"
                                   " and the transformer has not yet been estimated. Call estimate() before.")
        if isinstance(self.dim, float):
            if hasattr(self, "cumvar") and self.cumvar is not None:
                return np.count_nonzero(self.cumvar >= self.dim)
            else:
                raise RuntimeError("Requested dimension, but the dimension depends on the cumulative variance and the "
                                   "transformer has not yet been estimated. Call estimate() before.")
        else:
            if hasattr(self, "_rank0"):
                return np.min([self._rank0, self._rankt, self.dim])
            else:

After Change



    def dimension(self):
         output dimension 
        if self.C00 is None:  // no data yet
            if isinstance(self.dim, int):  // return user choice
                warnings.warn("Returning user-input for dimension, since this model has not yet been estimated.")
                return self.dim
            raise RuntimeError("Please call set_model_params prior using this method.")

        if not self._svd_performed:
            self._diagonalize()
        return self._dimension(self._rank0, self._rankt, self.dim, self.singular_values)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 7

Instances


Project Name: markovmodel/PyEMMA
Commit Name: 12b360c6dae048ae2c1c235884627413c432e530
Time: 2018-02-09
Author: m.scherer@fu-berlin.de
File Name: pyemma/coordinates/transform/vamp.py
Class Name: VAMPModel
Method Name: dimension


Project Name: cornellius-gp/gpytorch
Commit Name: d44475866914c19f23c0f8a833951f9989250334
Time: 2018-11-17
Author: balandat@fb.com
File Name: gpytorch/kernels/kernel.py
Class Name: Kernel
Method Name: __init__


Project Name: mne-tools/mne-python
Commit Name: 5633254b08c6cd97c4e261c06e08459eb51f9516
Time: 2019-03-08
Author: larson.eric.d@gmail.com
File Name: mne/utils/check.py
Class Name:
Method Name: _check_one_ch_type


Project Name: IDSIA/sacred
Commit Name: 958e50b6eddf4fe101cdd8aabf755e8843256b37
Time: 2016-12-01
Author: qwlouse@gmail.com
File Name: sacred/experiment.py
Class Name: Experiment
Method Name: __init__


Project Name: IDSIA/sacred
Commit Name: 0cd42478586c9cb1febb6b76eea068aac8869a1e
Time: 2018-01-24
Author: dismaldenizen@gmail.com
File Name: sacred/ingredient.py
Class Name: Ingredient
Method Name: __init__