docstr: Perform mean matching
  
  Parameters
  ----------
  variable: int
      The variable being imputed
  
  objective: str
      The lightgbm objective used to create predictions for
      the variable.
  
  kwargs
      miceforest will automatically determine which objects
      need to be generated based on the mean matching function
      arguments. These arguments are passed as kwargs.
  
  Returns
  -------
  np.ndarray of imputation values.
docstr_tok: ["Perform","mean","matching","Parameters","--","--","--","--","--","variable",":","int","The","variable","being","imputed","objective",":","str","The","lightgbm","objective","used","to","create","predictions","for","the","variable",".","kwargs","miceforest","will","automatically","determine","which","objects","need","to","be","generated","based","on","the","mean","matching","function","arguments",".","These","arguments","are","passed","as","kwargs",".","Returns","--","--","--","-","np.ndarray","of","imputation","values","."]
code: def _mean_match(self, variable, objective, **kwargs):
      """
      Perform mean matching
  
      Parameters
      ----------
      variable: int
          The variable being imputed
  
      objective: str
          The lightgbm objective used to create predictions for
          the variable.
  
      kwargs
          miceforest will automatically determine which objects
          need to be generated based on the mean matching function
          arguments. These arguments are passed as kwargs.
  
      Returns
      -------
      np.ndarray of imputation values.
  
      """
      obj_args = self.objective_args[objective]
      mmf = self.mean_match_functions[objective]
      mmc = self.mean_match_candidates[variable]
      if "mean_match_candidates" in obj_args:
          kwargs["mean_match_candidates"] = mmc
  
      for oa in obj_args:
          assert oa in list(
              kwargs
          ), f"objective {objective} requires {oa}, but it wasn't passed."
  
      mmf_args = {
          arg: val for arg, val in kwargs.items() if arg in obj_args
      }
      imp_values = mmf(**mmf_args)
      return imp_values
  
file_path: miceforest/miceforest/MeanMatchScheme.py
imports: from .compat import pd_DataFrame
  import inspect
  from copy import deepcopy
  from typing import Callable, Union, Dict, Set
  from numpy import dtype
label_desc: Use image node_id 13 for calling the MeanMatchScheme obj's underlying member method code with example usage: obj._mean_match(variable, objective) and returns: imp_values