class_docstr: OneR (One Rule) Classifier.
  
  Parameters
  ----------
  resolve_ties : str (default: 'first')
      Option for how to resolve ties if two or more features
      have the same error. Options are
      - 'first' (default): chooses first feature in the list, i.e.,
        feature with the lower column index.
      - 'chi-squared': performs a chi-squared test for each feature
        against the target and selects the feature with the lowest p-value.
  
  Attributes
  ----------
  self.classes_labels_ : array-like, shape = [n_labels]
      Array containing the unique class labels found in the
      training set.
  
  self.feature_idx_ : int
      The index of the rules' feature based on the column in
      the training set.
  
  self.p_value_ : float
      The p value for a given feature. Only available after calling `fit`
      when the OneR attribute `resolve_ties = 'chi-squared'` is set.
  
  self.prediction_dict_ : dict
      Dictionary containing information about the
      feature's (self.feature_idx_)
      rules and total error. E.g.,
      `{'total error': 37, 'rules (value: class)': {0: 0, 1: 2}}`
      means the total error is 37, and the rules are
      "if feature value == 0 classify as 0"
      and "if feature value == 1 classify as 2".
      (And classify as class 1 otherwise.)
  
  For usage examples, please see
  https://rasbt.github.io/mlxtend/user_guide/classifier/OneRClassifier/
code: def __init__(self, resolve_ties="first"):
      allowed = {"first", "chi-squared"}
      if resolve_ties not in allowed:
          raise ValueError(
              "resolve_ties must be in %s. Got %s."
              % (allowed, resolve_ties)
          )
      self.resolve_ties = resolve_ties
  
file_path: mlxtend/mlxtend/classifier/oner.py
imports: import warnings
  import numpy
  from scipy.stats import chi2_contingency
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.exceptions import NotFittedError
label_desc: Use image node_id 1 to create a new OneRClassifier object from inherited base classes: BaseEstimator, ClassifierMixin with example: obj = OneRClassifier(resolve_ties)