class_docstr: No frill Logistic Regressor w. one-vs-rest estimation of P(label).
  
  MWE of a Scikit-learn classifier.
  
  LogisticRegression is a simple classifier estimator designed for
  transparency in unit testing. It implements a Logistic
  Regression with one-vs-rest strategy of classification.
  
  The estimator is a wrapper around the :class:`OLS`. The OLS
  prediction is squashed using the Sigmoid function, and classification
  is done by picking the label with the highest probability.
  
  The ``offset`` option allows the user to offset weights in the OLS by a
  scalar value, if different instances should be differentiated in their
  predictions.
  
  Examples
  --------
  
  Asserting the LogisticRegression passes the Scikit-learn estimator test
  
  >>> from sklearn.utils.estimator_checks import check_estimator
  >>> from mlens.utils.dummy import LogisticRegression
  >>> check_estimator(LogisticRegression)
  
  Comparison with Scikit-learn's LogisticRegression
  
  >>> from mlens.utils.dummy import LogisticRegression as mlensL
  >>> from sklearn.linear_model import LogisticRegression as sklearnL
  >>> from sklearn.datasets import make_classification
  >>> X, y = make_classification()
  >>>
  >>> slr = sklearnL()
  >>> slr.fit(X, y)
  >>>
  >>> mlr = mlensL()
  >>> mlr.fit(X, y)
  >>>
  >>> (mlr.predict(X) == slr.predict(X)).sum() / y.shape
  array([ 0.98])
class_docstr_tok: ["No","frill","Logistic","Regressor","w.","one-vs-rest","estimation","of","P","(","label",")",".","MWE","of","a","Scikit-learn","classifier",".","LogisticRegression","is","a","simple","classifier","estimator","designed","for","transparency","in","unit","testing",".","It","implements","a","Logistic","Regression","with","one-vs-rest","strategy","of","classification",".","The","estimator","is","a","wrapper","around","the",":","class",":","`","OLS","`",".","The","OLS","prediction","is","squashed","using","the","Sigmoid","function",",","and","classification","is","done","by","picking","the","label","with","the","highest","probability",".","The","``","offset","``","option","allows","the","user","to","offset","weights","in","the","OLS","by","a","scalar","value",",","if","different","instances","should","be","differentiated","in","their","predictions",".","Examples","--","--","--","--","Asserting","the","LogisticRegression","passes","the","Scikit-learn","estimator","test",">",">",">","from","sklearn.utils.estimator_checks","import","check_estimator",">",">",">","from","mlens.utils.dummy","import","LogisticRegression",">",">",">","check_estimator","(","LogisticRegression",")","Comparison","with","Scikit-learn","'s","LogisticRegression",">",">",">","from","mlens.utils.dummy","import","LogisticRegression","as","mlensL",">",">",">","from","sklearn.linear_model","import","LogisticRegression","as","sklearnL",">",">",">","from","sklearn.datasets","import","make_classification",">",">",">","X",",","y","=","make_classification","(",")",">",">",">",">",">",">","slr","=","sklearnL","(",")",">",">",">","slr.fit","(","X",",","y",")",">",">",">",">",">",">","mlr","=","mlensL","(",")",">",">",">","mlr.fit","(","X",",","y",")",">",">",">",">",">",">","(","mlr.predict","(","X",")","==","slr.predict","(","X",")",")",".sum","(",")","\/","y.shape","array","(","[","0.98","]",")"]
docstr: Get label predictions.
docstr_tok: ["Get","label","predictions","."]
code: def predict(self, X):
      """Get label predictions."""
      if not hasattr(self, "_models_"):
          raise NotFittedError(
              "Estimator not fitted. Call 'fit' first."
          )
  
      X = check_array(X, accept_sparse=False)
  
      preds = self.predict_proba(X)
  
      labels = np.zeros(X.shape[0])
      for i in range(X.shape[0]):
          labels[i] = self.labels_[preds[i].argmax()]
  
      return labels
  
file_path: mlens/mlens/utils/dummy.py
imports: from __future__ import division, print_function
  import numpy
  from .exceptions import NotFittedError
  from ..externals.sklearn.base import BaseEstimator, TransformerMixin
label_desc: Use image node_id 3 for calling the LogisticRegression obj's underlying member method code with example usage: obj.predict(X) and returns: labels