wdm0006/sklearn-extensions · elm.py
python logo
def predict(self, X):
        """
        Predict values using the model

        Parameters
        ----------
        X : {array-like, sparse matrix} of shape [n_samples, n_features]

        Returns
        -------
        C : numpy array of shape [n_samples, n_outputs]
            Predicted values.
        """
        if self._genelm_regressor is None:
            raise ValueError("SimpleELMRegressor not fitted")

        return self._genelm_regressor.predict(X)
Similar code snippets
1.
bsmurphy/PyKrige · rk.py
Match rating: 63.77% · See similar code snippets
python logo
def predict(self, p, x):
        """
        Parameters
        ----------
        p: ndarray
            (Ns, d) array of predictor variables (Ns samples, d dimensions)
            for regression
        x: ndarray
            ndarray of (x, y) points. Needs to be a (Ns, 2) array
            corresponding to the lon/lat, for example.
            array of Points, (x, y, z) pairs of shape (N, 3) for 3d kriging

        Returns
        -------
        pred: ndarray
            The expected value of ys for the query inputs, of shape (Ns,).

        """

        return self.krige_residual(x) + self.regression_model.predict(p)
2.
HDI-Project/ballet · modeler.py
Match rating: 59.87% · See similar code snippets
python logo
def predict(self, X):
        X = self._format_X(X)
        return self.estimator.predict(X)
3.
VIVelev/PyDojoML · extra_classification.py
Match rating: 59.04% · See similar code snippets
python logo
def predict(self, X):
        X = super().predict(X)
        return np.array([tree_predict(x, self.root) for x in X])
4.
mattjj/pylds · distributions.py
Match rating: 59.01% · See similar code snippets
python logo
def predict(self, x):
        return np.exp(x.dot(self.A.T))
5.
matousc89/padasip · base_filter.py
Match rating: 58.63% · See similar code snippets
python logo
def predict(self, x):
        """
        This function calculates the new output value `y` from input array `x`.

        **Args:**

        * `x` : input vector (1 dimension array) in length of filter.

        **Returns:**

        * `y` : output value (float) calculated from input array.

        """
        y = np.dot(self.w, x)
        return y
6.
wdm0006/sklearn-extensions · elm.py
Match rating: 58.54% · See similar code snippets
python logo
def predict(self, X):
        """
        Predict values using the model

        Parameters
        ----------
        X : {array-like, sparse matrix} of shape [n_samples, n_features]

        Returns
        -------
        C : numpy array of shape [n_samples, n_outputs]
            Predicted values.
        """
        if not self.fitted_:
            raise ValueError("ELMRegressor not fitted")

        # compute hidden layer activations
        self.hidden_activations_ = self.hidden_layer.transform(X)

        # compute output predictions for new hidden activations
        predictions = self._get_predictions()

        return predictions
7.
dmbee/seglearn · pipe.py
Match rating: 58.28% · See similar code snippets
python logo
def predict(self, X):
        """
        Apply transforms to the data, and predict with the final estimator

        Parameters
        ----------
        X : iterable
            Data to predict on. Must fulfill input requirements of first step
            of the pipeline.

        Returns
        -------
        yp : array-like
            Predicted transformed target
        """
        Xt, _, _ = self._transform(X)
        return self._final_estimator.predict(Xt)
8.
VIVelev/PyDojoML · linear_regression.py
Match rating: 58.21% · See similar code snippets
python logo
def predict(self, X):
        X = super().predict(X)
        return X @ self.coefs + self.intercept
9.
VIVelev/PyDojoML · algorithms.py
Match rating: 58.11% · See similar code snippets
python logo
def predict(self, X):
        X = super().predict(X)
        assert len(X.shape) == 2

        return np.array([self.p(x) for x in X])
10.
slundberg/shap · models.py
Match rating: 58.06% · See similar code snippets
python logo
def predict(self, X):
        X = self.scaler.transform(X)
        if self.flatten_output:
            return self.model.predict(X).flatten()
        else:
            return self.model.predict(X)