226340622c3c9f6108d6efbed2f9967e2679802e,mvpa/clfs/glmnet.py,GLMNET,_predict,#GLMNET#Any#,165

Before Change


                                 s=self.__trained_model["beta.pure"].shape[0])
                                 //s=self.__lowest_Cp_step)
                                 
        fit = N.asarray(res["fit"])
        if len(fit.shape) == 0:
            // if we just got 1 sample with a scalar
            fit = fit.reshape( (1,) )
        return fit


    def _getFeatureIds(self):

After Change


        if self.params.family == "multinomial":
            // get the classes too (they are 1-indexed)
            rpy.set_default_mode(rpy.NO_CONVERSION)
            class_ind = rpy.r.predict(self.__trained_model,
                                      newx=data,
                                      type="class",
                                      s=self.__last_lambda)
            rpy.set_default_mode(rpy.NO_DEFAULT)
            class_ind = rpy.r.as_vector(class_ind)

            // convert the strings to ints and subtract 1
            class_ind = N.array([int(float(c))-1 for c in class_ind])
            
            // convert to actual labels
            classes = self.__ulabels[class_ind]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: PyMVPA/PyMVPA
Commit Name: 226340622c3c9f6108d6efbed2f9967e2679802e
Time: 2009-04-19
Author: psederberg@gmail.com
File Name: mvpa/clfs/glmnet.py
Class Name: GLMNET
Method Name: _predict


Project Name: dpressel/mead-baseline
Commit Name: da1e8c2de9b265dcb18256a0a087165faf138b42
Time: 2019-01-14
Author: blester125@users.noreply.github.com
File Name: python/baseline/dy/seq2seq/train.py
Class Name: Seq2SeqTrainerDynet
Method Name: test


Project Name: autorope/donkeycar
Commit Name: 468b7ab7a48a6712991dcbb4ec399a4dc95bd091
Time: 2016-12-14
Author: wroscoe@gmail.com
File Name: manage.py
Class Name:
Method Name: drive_loop