{"id":27954,"library":"miceforest","title":"miceforest","description":"Fast multiple imputation using Random Forests and LightGBM, implementing Multiple Imputation by Chained Equations (MICE). Current version: 6.0.5, release cadence: irregular major versions with breaking changes.","status":"active","version":"6.0.5","language":"python","source_language":"en","source_url":"https://github.com/AnotherSamWilson/miceforest","tags":["imputation","MICE","missing-data","lightgbm","random-forest"],"install":[{"cmd":"pip install miceforest","lang":"bash","label":"pip"}],"dependencies":[{"reason":"required for model training","package":"lightgbm","optional":false},{"reason":"data manipulation","package":"pandas","optional":false},{"reason":"array operations","package":"numpy","optional":false}],"imports":[{"note":"renamed in v5.0.0","wrong":"from miceforest import MultipleImputedKernel","symbol":"ImputationKernel","correct":"from miceforest import ImputationKernel"},{"note":"renamed in v5.0.0","wrong":"from miceforest import ImputedDataSet","symbol":"ImputedData","correct":"from miceforest import ImputedData"}],"quickstart":{"code":"import miceforest as mf\nfrom sklearn.datasets import load_iris\nimport pandas as pd\nimport numpy as np\niris = load_iris()\ndf = pd.DataFrame(iris.data, columns=iris.feature_names)\ndf.iloc[:20, 0] = np.nan\nkernel = mf.ImputationKernel(dataset=df, datasets=1, save_all_iterations=True, random_state=1)\nkernel.mice(1)\ncompleted = kernel.complete_data()\nprint(completed.isnull().sum())","lang":"python","description":"Basic imputation using the main class."},"warnings":[{"fix":"Pass a pandas DataFrame instead of a numpy array.","message":"In v6.0.0, native numpy array input was removed. Only pandas DataFrames are accepted.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Use e.g., kernel = ImputationKernel(..., mean_match_strategy='shap', mean_match_candidates=10)","message":"MeanMatchScheme classes from v5.x are replaced by string parameters 'mean_match_strategy' and 'mean_match_candidates' in v6.0.0.","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Use 'ImputationKernel' and 'ImputedData' from miceforest.","message":"In v5.0.0, class names were changed: 'ImputationKernel' is now the main class, and 'ImputedData' replaces 'ImputedDataSet'. Old names cause ImportError.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"If loading a kernel saved with v5.x, re-run imputation on the original data instead of loading.","message":"When saving/loading kernels, use standard pickle or joblib, but ensure you use '__getstate__' and '__setstate__' overrides. In v6.0.0, modernized saving may break older pickles.","severity":"gotcha","affected_versions":">=6.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'ImputedData' instead: from miceforest import ImputedData","cause":"Class renamed in v5.0.0.","error":"ImportError: cannot import name 'ImputedDataSet' from 'miceforest'"},{"fix":"Use 'data_subset' parameter instead, or adjust your code to v6.x API.","cause":"Parameter removed in v6.0.0.","error":"TypeError: ImputationKernel.__init__() got an unexpected keyword argument 'mean_match_subset'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}