Skip to content

Commit

Permalink
[#64] Rename mice -> buck_iterative
Browse files Browse the repository at this point in the history
  • Loading branch information
eltonlaw committed Jul 11, 2019
1 parent 11c9d11 commit fde2f71
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions impyute/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from impyute.imputation.cs import mode
from impyute.imputation.cs import em
from impyute.imputation.cs import fast_knn
from impyute.imputation.cs import mice
from impyute.imputation.cs import buck_iterative
from impyute.imputation.cs import random

__all__.extend([
Expand All @@ -31,7 +31,7 @@
"mode",
"em",
"fast_knn",
"mice",
"buck_iterative",
"random"
])

Expand Down
4 changes: 2 additions & 2 deletions impyute/imputation/cs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from .central_tendency import mean
from .central_tendency import mode
from .central_tendency import median
from .mice import mice
from .buck_iterative import buck_iterative
from .em import em
from .fast_knn import fast_knn

__all__ = ["random", "mean", "mode",
"median", "mice", "em", "fast_knn"]
"median", "buck_iterative", "em", "fast_knn"]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" impyute.imputation.cs.mice """
""" impyute.imputation.cs.buck_iterative """
import numpy as np
from sklearn.linear_model import LinearRegression
from impyute.util import find_null
Expand All @@ -10,7 +10,7 @@

@preprocess
@checks
def mice(data, **kwargs):
def buck_iterative(data, **kwargs):
"""Multivariate Imputation by Chained Equations
Reference:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""test_mice.py"""
"""test_buck_iterative.py"""
import unittest
import numpy as np
import impyute as impy
Expand All @@ -25,12 +25,12 @@ def setUp(self):

def test_return_type(self):
""" Check return type, should return an np.ndarray"""
imputed = impy.mice(self.data_m)
imputed = impy.buck_iterative(self.data_m)
self.assertTrue(isinstance(imputed, np.ndarray))

def test_impute_missing_values(self):
""" After imputation, no NaN's should exist"""
imputed = impy.mice(self.data_m)
imputed = impy.buck_iterative(self.data_m)
self.assertFalse(np.isnan(imputed).any())

if __name__ == "__main__":
Expand Down

0 comments on commit fde2f71

Please sign in to comment.