Skip to content

Commit bf43afb

Browse files
committed
removed unnecessary sub dir
1 parent 3247d5b commit bf43afb

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

dsbox/overfitdetector/detector.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
this class will assume it is already pre-processed
2020
"""
2121

22-
from dsbox.overfitdetector.util.utilities import Utilities
2322
import pandas
2423
import numpy as np
2524
from scipy.stats import chi2_contingency, normaltest
@@ -374,7 +373,7 @@ def find_matching_rows(self, row_values, columns, training_data, num_neighbors=1
374373

375374
matches = training_data
376375
for (col, val) in zip(col_set, vals_for_col_set):
377-
if Utilities.is_number(val):
376+
if self.is_number(val):
378377
lower_bound = float(val) * (1.0 - real_value_extend)
379378
upper_bound = float(val)*(1.0 + real_value_extend)
380379
matches = matches[matches[col] >= lower_bound]
@@ -503,3 +502,15 @@ def counts_to_distribution(self, column_values):
503502
distribution.append((colval, float(counts[colval]) / total))
504503

505504
return distribution
505+
506+
def csv_to_dataframe(self, path_to_csv):
507+
data = pandas.read_csv(path_to_csv) # all read as str
508+
return data
509+
510+
def is_number(self, s):
511+
# type: (number) -> number
512+
try:
513+
float(s)
514+
return True
515+
except ValueError:
516+
return False

dsbox/overfitdetector/util/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

dsbox/overfitdetector/util/utilities.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)