INNER CODE UNIT · Python

__getstate__

AnotherSamWilson/miceforest · miceforest/imputation_kernel.py:322

    def __getstate__(self):
        """
        For pickling
        """
        # Copy the entire object, minus the big stuff

        special_handling = ["imputation_values"]
        if self.save_all_iterations_data:
            special_handling.append("candidate_preds")

        state = {
            key: value
            for key, value in self.__dict__.items()
            if key not in special_handling
        }.copy()

        state["imputation_values"] = {}
        state["candidate_preds"] = {}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…