How to use the pyemma.util.pystallone.stallone_array_to_ndarray function in pyEMMA

To help you get started, we’ve selected a few pyEMMA examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github markovmodel / msmtools / estimation / dense / hidden_markov_model.py View on Github external
def transition_matrix(self):
        """
        Returns the hidden transition matrix
        """
        return stallone.stallone_array_to_ndarray(self.hmm.getTransitionMatrix())
github markovmodel / PyEMMA / pyemma / coordinates / transform / linear_transform.py View on Github external
def covariance_matrix_lagged(self):
        """
        Returns the lagged covariance matrix estimated from the data
        """
        return stallone.stallone_array_to_ndarray(self.__jtransform().getCovarianceMatrixLagged())
github markovmodel / PyEMMA / pyemma / coordinates / clustering / api.py View on Github external
# load input
    datainput = dataNew.dataInput(stallone.list_to_java_list(infiles))
    nseq = datainput.numberOfSequences()
    # assign data
    res = []

    for i in xrange(nseq):
        seq = datainput.getSequence(i)
        jdtraj = cluster.discretize(seq, idisc)

        # write to file if requested
        if (outfiles is not None):
            intseq.writeIntSequence(jdtraj, outfiles[i])
        # store return data if requested
        if (return_discretization):
            dtraj = stallone.stallone_array_to_ndarray(jdtraj)
            res.append(dtraj)
    # return discrete trajectories if requested
    if (return_discretization):
        if singlefile:
            return res[0]
        else:
            return res
github markovmodel / msmtools / estimation / dense / hidden_markov_model.py View on Github external
def output_matrix(self):
        """
        Returns the output probability matrix B, with b_ij
        containing the probability that hidden state i will output to observable state j
        """
        return stallone.stallone_array_to_ndarray(self.hmm.getOutputParameters())
github markovmodel / PyEMMA / pyemma / coordinates / transform / general_transform.py View on Github external
def transform(self, x):
        """
        Transforms input data x
        
        WARNING: This is generally inefficient due to the current python-java
        interface - so using this might slow your code down. The prefered
        way of doing transforms is through the mass transform functions of
        the transform api (e.g. transform_file).
        Subclasses of CoordinateTransform might have an efficient implementation.
        """
        y = self._jcoordinatetransform.transform(stallone.ndarray_to_stallone_array(x))
        return stallone.stallone_array_to_ndarray(y)
github markovmodel / PyEMMA / pyemma / coordinates / transform / linear_transform.py View on Github external
def mean(self):
        """
        Returns the mean vector estimated from the data
        """
        return stallone.stallone_array_to_ndarray(self.jtransform().getMeanVector())