INNER CODE UNIT · Python
__repr__
AnotherSamWilson/miceforest · miceforest/imputation_kernel.py:365
def __repr__(self):
summary_string = f'\n{" " * 14}Class: ImputationKernel\n{self._ids_info()}'
return summary_string
def _initialize_dataset(self, imputed_data, random_state):
"""
Sets initial imputation values for iteration 0.
If "random", draw values from the working data at random.
If "empty", keep the values missing, since missing values
can be handled natively by lightgbm.
"""
assert not imputed_data.initialized, "dataset has already been initialized"
if self.initialize_empty:
# The default value when initialized is np.nan, nothing to do here
pass
else: