Skip to content

Commit

Permalink
reorder a constant/missing comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Normoyle committed Jul 26, 2013
1 parent a37a080 commit ef7b031
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions py/h2o_glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,7 @@ def goodXFromColumnInfo(y,
x.remove(k)
ignore_x.append(k)

elif k in constantValuesDict:
value = constantValuesDict[k]
print "Removing %d with name: %s because it has constant value: %s " % (k, name, str(value))
x.remove(k)
ignore_x.append(k)

# missing values reports as constant also. so do missing first.
# remove all cols with missing values
# could change it against num_rows for a ratio
elif k in missingValuesDict:
Expand All @@ -340,6 +335,12 @@ def goodXFromColumnInfo(y,
x.remove(k)
ignore_x.append(k)

elif k in constantValuesDict:
value = constantValuesDict[k]
print "Removing %d with name: %s because it has constant value: %s " % (k, name, str(value))
x.remove(k)
ignore_x.append(k)

# this is extra pruning..
# remove all cols with enums, if not already removed
elif k in enumSizeDict:
Expand Down

0 comments on commit ef7b031

Please sign in to comment.