class_docstr: Base linear model.
  
  Currently wrapper around linear models in scikit-learn.
  
  https://github.com/scikit-learn/scikit-learn
class_docstr_tok: ["Base","linear","model",".","Currently","wrapper","around","linear","models","in","scikit-learn",".","https",":","\/\/github.com\/scikit-learn\/scikit-learn"]
docstr: Provides global explanation for model.
  
  Args:
      name: User-defined explanation name.
  
  Returns:
      An explanation object,
      visualizing feature-value pairs as horizontal bar chart.
docstr_tok: ["Provides","global","explanation","for","model",".","Args",":","name",":","User-defined","explanation","name",".","Returns",":","An","explanation","object",",","visualizing","feature-value","pairs","as","horizontal","bar","chart","."]
code: def explain_global(self, name=None):
      """Provides global explanation for model.
  
      Args:
          name: User-defined explanation name.
  
      Returns:
          An explanation object,
          visualizing feature-value pairs as horizontal bar chart.
      """
  
      check_is_fitted(self, "has_fitted_")
  
      if name is None:
          name = gen_name_from_class(self)
  
      model = self._model()
      if is_classifier(self):
          intercept = model.intercept_[0]
          coef = model.coef_[0]
      else:
          intercept = model.intercept_
          coef = model.coef_
  
      overall_data_dict = {
          "names": self.feature_names_in_,
          "scores": list(coef),
          "extra": {"names": ["Intercept"], "scores": [intercept]},
      }
  
      specific_data_dicts = []
      for index, feature in enumerate(self.feature_names_in_):
          feat_min = self.X_mins_[index]
          feat_max = self.X_maxs_[index]
          feat_coef = coef[index]
  
          feat_type = self.feature_types_in_[index]
  
          if feat_type == "continuous":
              # Generate x, y points to plot from coef for continuous features
              grid_points = np.linspace(feat_min, feat_max, 30)
          else:
              grid_points = np.array(self.categorical_uniq_[index])
  
          y_scores = feat_coef * grid_points
  
          data_dict = {
              "names": grid_points,
              "scores": y_scores,
              "density": {
                  "scores": self.bin_counts_[index],
                  "names": self.bin_edges_[index],
              },
          }
  
          specific_data_dicts.append(data_dict)
  
      internal_obj = {
          "overall": overall_data_dict,
          "specific": specific_data_dicts,
          "mli": [
              {
                  "explanation_type": "global_feature_importance",
                  "value": {
                      "scores": list(coef),
                      "intercept": intercept,
                  },
              }
          ],
      }
      return LinearExplanation(
          "global",
          internal_obj,
          feature_names=self.feature_names_in_,
          feature_types=self.feature_types_in_,
          name=name,
          selector=self.global_selector_,
      )
  
imports: from ..api.base import ExplainerMixin
  from ..api.templates import FeatureValueExplanation
  from ..utils._explanation import gen_name_from_class, gen_global_selector, gen_local_selector
  from ..utils._explanation import gen_perf_dicts
  from abc import abstractmethod
  from sklearn.base import is_classifier
  from sklearn.utils.validation import check_is_fitted
  import numpy
  from sklearn.base import ClassifierMixin, RegressorMixin
  from sklearn.linear_model import LogisticRegression
  from sklearn.linear_model import LinearRegression
  from ..utils._clean_x import preclean_X
  from ..utils._clean_simple import clean_dimensions, typify_classification
  from ..utils._unify_data import unify_data
label_desc: Use image node_id 6 for calling the BaseLinear obj's underlying member method code with example usage: obj.explain_global(name) and returns: LinearExplanation