code: def predict_raw(self, X):
          
          # b -- bias for the input and h layers
          b = np.ones((X.shape[0], 1))
          w2 = self.w[-(self.h + 1):].reshape(self.h + 1, 1)
          w1 = self.w[:-(self.h + 1)].reshape(self.i + 1, self.h)
  
          # Make X to have the same number of columns as self.i.
          # Because of the sparse matrix representation, X for prediction can
          # have a different number of columns.
          if X.shape[1] > self.i:
              # If X has more columns, cut extra columns.
              X = X[:, :self.i]
          elif X.shape[1] < self.i:
              # If X has less columns, cut the rows of the weight matrix between
              # the input and h layers instead of X itself because the SciPy
              # sparse matrix does not support .set_shape() yet.
              idx = range(X.shape[1])
              idx.append(self.i)        # Include the last row for the bias
              w1 = w1[idx, :]
  
          if sparse.issparse(X):
              return np.hstack((sigm(sparse.hstack((X, b)).dot(w1)), b)).dot(w2)
          else:
              return np.hstack((sigm(np.hstack((X, b)).dot(w1)), b)).dot(w2)
docs: Predict targets for a feature matrix.
  
          Args:
              X (np.array of float): feature matrix for prediction