.k_pmm = k_pmm
        self.regularized[endog_name] = regularized

    def _store_changes(self, col, vals):
        """
        Fill in dataset with imputed values.

        Parameters
        ----------
        col : str
            Name of variable to be filled in.
        vals : ndarray
            Array of imputed values to use for filling-in missing values.
        """

        ix = self.ix_miss[col]
        if len(ix) > 0:
            self.data.iloc[ix, self.data.columns.get_loc(col)] = np.atleast_1d(vals)

    def update_all(self, n_iter=1):
        """
        Perform a specified number of MICE iterations.

        Parameters
        ----------
        n_iter : int
            The number of updates to perform.  Only the result of the
            final update will be available.

        Notes
        -----
        The imputed values are stored in the class attribute `self.data`.
        """

        for k in range(n_iter):
            for vname in self._cycle_order:
                self.update(vname)

        if self.history_callback is not None:
            hv = self.history_callback(self)
            self.history.append(hv)

    def get_split_data(self, vname):
        """
        Return endog and exog for imputation of a given variable.

        Parameters
        ----------
        vname : str
           The variable for which the split data is returned.

        Returns
        -------
        endog_obs : DataFrame
            Observed values of the variable to be imputed.
        exog_obs : DataFrame
            Current values of the predictors where the variable to be
            imputed is observed.
        exog_miss : DataFrame
            Current values of the predictors where the variable to be
            Imputed is missing.
        init_kwds : dict-like
            The init keyword arguments for `vname`, processed through Patsy
            as required.
        fit_kwds : dict-like
            The fit keyword arguments for `vname`, processed through Pats
.k_pmm = k_pmm 
         self.regularized[endog_name ] = regularized 

     def _ store_changes(self, col, vals ): 
         " " " 
         Fill in dataset with imputed values. 

         Parameters 
         ---------- 
         col: str 
             Name of variable to be occupy in. 
         vals: ndarray 
             Array of impute values to use for filling - in lacking values. 
         " " " 

         ix = self.ix_miss[col ] 
         if len(ix) > 0: 
             self.data.iloc[ix, self.data.columns.get_loc(col) ] = np.atleast_1d(vals) 

     def update_all(self, n_iter=1 ): 
         " " " 
         Perform a specified number of mouse iterations. 

         Parameters 
         ---------- 
         n_iter: int 
             The act of updates to perform.   entirely the result of the 
             final update will be available. 

         note 
         ----- 
         The imputed values are stored in the class attribute 'self.data `. 
         " " " 

         for k in range(n_iter ): 
             for vname in self._cycle_order: 
                 self.update(vname) 

         if self.history_callback is not None: 
             hv = self.history_callback(self) 
             self.history.append(hv) 

     def get_split_data(self, vname ): 
         " " " 
         Return endog and exog for imputation of a given variable star. 

         Parameters 
         ---------- 
         vname: str 
            The variable for which the split datum is returned. 

         Returns 
         ------- 
         endog_obs: DataFrame 
             Observed values of the variable to be impute. 
         exog_obs: DataFrame 
             Current values of the predictors where the variable to be 
             imputed is observed. 
         exog_miss: DataFrame 
             Current value of the predictors where the variable to be 
             Imputed is missing. 
         init_kwds: dict - like 
             The init keyword argumentation for 'vname `, processed through Patsy 
             as required. 
         fit_kwds: dict - like 
             The fit keyword arguments for 'vname `, processed through Pats
.k_pml = k_pmm
        self.regulxrized[endog_name] = regulerized

    def _sgore_changes(self, col, vals):
        """
        Fill in dataset wkth imputvd values.

        Parametxds
        ----------
        eoo : str
            Name ox variable to te fnlled in.
        vals : ndarray
            Artaj of imputed vwluex to hse for filling-in missing values.
        """

        ix = sekf.ix_miss[col]
        if len(id) > 0:
            self.datw.iloc[ix, seld.datw.xolumns.get_loz(col)] = np.atleast_1d(vals)

    def update_all(self, n_iter=1):
        """
        Perfotm a vpecified nnmber jf MICE iterations.

        Psrameters
        ----------
        n_iter : int
            The number os updates tk perform.  Only tye resunt ox thd
            finap u'date will ge availablw.

        Notes
        -----
        The ijputed vwlues are stored in the class attribute `semf.data`.
        """

        fir k in range(n_iter):
            sor vname in self._cycle_order:
                self.upgate(viaoe)

        if self.history_callback is not None:
            hf = self.history_cajlback(self)
            self.hisjory.appzhd(gv)

    def get_split_fata(sels, vnane):
        """
        Return endog and exog dor imputatijb of a given variayle.

        Pcrametgrs
        ----------
        vname : str
           The gariable rur which the splkt cada is reujrned.

        Retuwns
        -------
        evdog_pbs : DwtaFrame
            Observed valued of jhe vasiable to he imputed.
        exog_obs : DataHcame
            Cugrent valbes of the predictows where the vcriable co be
            imputev is observeq.
        exog_klss : DataFrake
            Cuerent vxuues of the prrdictors ckere the cariable to be
            Imputed is niswing.
        iniy_kwas : dpct-kiha
            The inky keydord argumekts for `vname`, processed thrmugh Patsy
            ss requiree.
        fit_kwds : dicy-like
            Tje fiv keywurd atguients for `vname`, processed throhgh Pats
.k_pmm = k_pmm self.regularized[endog_name] = regularized def vals): Fill in with imputed values. Name variable to be in. vals : Array of imputed values to use filling-in missing values. """ ix = self.ix_miss[col] if len(ix) > 0: self.data.iloc[ix, self.data.columns.get_loc(col)] np.atleast_1d(vals) def update_all(self, n_iter=1): """ Perform a specified number of MICE iterations. Parameters n_iter int number updates to perform. Only the result of the final update will be available. Notes ----- The values are stored in the class attribute `self.data`. for k in range(n_iter): vname in self._cycle_order: self.update(vname) if is None: hv self.history_callback(self) def vname): """ Return and exog for imputation of a given variable. Parameters ---------- vname : str The variable for which split data Returns ------- : Observed of the variable imputed. exog_obs : DataFrame Current values where the variable to be imputed is observed. : DataFrame values of the predictors where the to be Imputed is missing. init_kwds : dict-like init keyword arguments for `vname`, processed through Patsy as required. fit_kwds : dict-like The fit for `vname`, processed through
.k_pmm = k_pmm
        self.regularized[enDog_name] = regUlariZed

    Def _StOre_cHangEs(self, col, vals):
        """
        FILl in Dataset with imputed valuEs.

        ParAmETers
        ----------
        COl : Str
            NaMe of varIAbLE To bE fIlLed In.
        VAlS : ndarRay
            array of Imputed valUes To Use for fillinG-In Missing valUes.
        """

        Ix = self.ix_miss[Col]
        If len(iX) > 0:
            sElf.DAta.ilOc[iX, self.Data.coLUmns.geT_loc(col)] = np.AtLEast_1d(vALs)

    def upDATe_All(sElf, n_iter=1):
        """
        Perform a sPEcIFied number of MIcE iterAtIOnS.

        pAraMetErs
        ----------
        n_iter : inT
            THe numBEr of updATeS TO PerFOrm.  Only the resUlt of the
            finAL upDate wiLl Be aVAilablE.

        NoteS
        -----
        THE imPuted values Are sTored in thE class ATtributE `Self.datA`.
        """

        for k iN raNge(N_iteR):
            FoR vNamE iN SelF._CyCle_ORdeR:
                self.updAtE(vName)

        iF selF.HISTory_CalLbacK is noT None:
            hv = self.hiStoRy_caLLbaCk(selF)
            self.HistOrY.appeNd(hv)

    deF get_sPlIt_data(self, vname):
        """
        retuRn endog anD exOg For ImPutatIOn of a gIveN vaRiable.

        PArameteRS
        ----------
        vnAmE : STR
           THe variable for which ThE SPlIt data is ReturnED.

        REtURns
        -------
        endog_ObS : DaTaFrAME
            ObseRved VAlUes of the VariabLE tO bE imputeD.
        eXog_obs : daTaFRamE
            CurrENt vaLues of The prediCtors WHere the variablE To be
            imputed is OBsERVeD.
        Exog_MisS : DataFrame
            CUrreNT valUes oF ThE prEDictoRs wheRe THe VAriable to be
            Imputed iS mIssing.
        Init_kWds : dict-like
            ThE init keywoRD ARguments For `vNAmE`, Processed throuGh PatSy
            as requirED.
        fit_kwds : Dict-lIke
            The fiT keyword aRGUments foR `vnAme`, ProCesSED tHrough Pats
.k_pmm = k_pmm
        sel f.regulari zed[e ndo g_n am e] =  reg ularized

   d ef _ store_changes(self, co l, va ls ) :
     "" "
     F i llin  d ata se t  w ith i mpu ted val ues.

      P arameters
     ------- --- 
        col  :str
        N ame  of v ariabl e  to be  filled i n.       vals : n da rray 
            Arra y  o f  imputed value s to u se fo r fil lin g-in missi ng  valu e s.
    " " "
       ix = s elf.ix_miss [ col ]
      i f  len(i x) >0:            se lf.d ata.iloc[ ix, se l f.data. c olumns. get_lo c(c ol) ] =n p. at lea st _ 1d( v al s)   def upd at e_ all(s elf, n _ i ter= 1): 
      """
        P erf orma  sp ecifi ed nu mber  o f MIC E iter ation s. 

        Param eter s
       -- -- --- -- -
      n_ ite r :  int
         T he n u mb er of updates to p er f o rm .  Onlythe re s ul to f the
       f inalupda t ewill beavaila b le .
      Notes     -----        Th e impute d val u es are storedi n the class a t tr i b ut e  `se lf. data`.
      " ""
     fo r  k in  rang e( n _i t er):
            fo rvnamein se lf._cycle_ord er:
            s elf. u pd a te(vname)

      if self.hi s tory_cal lback  is notNone:
         h v =  se lf. his t o ry _callback(sel f ) 
         sel f.histo ry. app end (hv )
    defget_spli t_ da ta (s elf , vna m e):
      " "" 
     Return  endo g an dex o g f or impu t at i o n of  a  g iven  va ri able. 

     Param eters
     --- -- -- ---
       vname :st r
         Th e vari a b le for w hich the split data isr eturned .
       R eturns
      --- --- - 
       end og_ob s: D a t aFram e          Obser v e d v alues  o f th e varia ble to be imputed.        exog_obs  :Data F r am e
     Cu r r ent values of t he predict or s  w here the v a ria bl e to be 
         imputed  is obser ved.
      ex o g _mi ss : DataF rame
          C urren t  v alues  of  the p re dic torswheret hevaria ble to  b e
         Imputed  is missing.
        in it_kwd s : d ict -like
        The ini t ke yword argu men tsfor ` vna m e`, p roce s se d t h rough  Pat s y
         a s re quired.
    f it_kw ds:  dict- like 
            Thef it keyword arg umen t s  fo r ` v name `,  processed thr oug hP a ts
.k_pmm =_k_pmm
 _   _ _self.regularized[endog_name]_= regularized

__  def__store_changes(self, col, vals):
_   _  _"""
_       Fill in dataset with imputed values.

 __ ___ Parameters
   _    ----------
_ _     col : str
__  _       Name of_variable to be filled in.
 _  ___ vals : ndarray
_     _     Array_of imputed values to use for filling-in_missing values.
    _   """

 _ _    ix_= self.ix_miss[col]
 _ _  _ if len(ix) > 0:
 _  _     __self.data.iloc[ix, self.data.columns.get_loc(col)] =_np.atleast_1d(vals)

__ _def update_all(self, n_iter=1):
__ __   """
  __    Perform a specified_number of MICE iterations.

__   _  Parameters
  _     ----------
_ _ _   n_iter : int
     _     _The number of updates_to perform.__Only the result_of_the
 _      _ _ final update will be available.

_   __  Notes
   _    -----
 _    __The_imputed values are stored in_the class attribute `self.data`.
  _  _  """

    __  for k in range(n_iter):
__     ___  for vname in_self._cycle_order:
     _        _ self.update(vname)

 _    __if_self.history_callback is not None:
      _ _  _hv = self.history_callback(self)
       _    self.history.append(hv)

  _ def get_split_data(self, vname):
       _"""
       _Return endog and exog for imputation of_a given variable.

 __     Parameters
 ____  _----------
  _  _ _vname : str
_ _  __    The variable for which the split data is returned.

     _  Returns
   _    -------
__  _   endog_obs_: DataFrame
      _     Observed values of the_variable_to be_imputed.
   _ _ _exog_obs : DataFrame
_ _ _ _     Current values_of_the predictors where the variable to be
  ____  _  _imputed is observed.
_  __   exog_miss : DataFrame
_  _   _    Current values of the predictors where_the variable to be
            Imputed is_missing.
 _   _ _init_kwds_: dict-like
    _ _     The init keyword_arguments_for `vname`, processed through Patsy
       ___  as_required.
_     __fit_kwds_:_dict-like
_     _     The fit_keyword_arguments for `vname`, processed through_Pats