Skip to content

Commit

Permalink
removed unnecessary sub dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mmichelsonIF committed Sep 25, 2017
1 parent 3247d5b commit bf43afb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
15 changes: 13 additions & 2 deletions dsbox/overfitdetector/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
this class will assume it is already pre-processed
"""

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

matches = training_data
for (col, val) in zip(col_set, vals_for_col_set):
if Utilities.is_number(val):
if self.is_number(val):
lower_bound = float(val) * (1.0 - real_value_extend)
upper_bound = float(val)*(1.0 + real_value_extend)
matches = matches[matches[col] >= lower_bound]
Expand Down Expand Up @@ -503,3 +502,15 @@ def counts_to_distribution(self, column_values):
distribution.append((colval, float(counts[colval]) / total))

return distribution

def csv_to_dataframe(self, path_to_csv):
data = pandas.read_csv(path_to_csv) # all read as str
return data

def is_number(self, s):
# type: (number) -> number
try:
float(s)
return True
except ValueError:
return False
1 change: 0 additions & 1 deletion dsbox/overfitdetector/util/__init__.py

This file was deleted.

17 changes: 0 additions & 17 deletions dsbox/overfitdetector/util/utilities.py

This file was deleted.

0 comments on commit bf43afb

Please sign in to comment.