Implement tests for ConvertTightIneqsIntoEqsStep

This commit is contained in:
2021-01-07 10:29:22 -06:00
parent 0377b5b546
commit d8dc8471aa
4 changed files with 40 additions and 5 deletions

View File

@@ -5,6 +5,7 @@
import logging
from copy import deepcopy
import numpy as np
from tqdm import tqdm
from miplearn import Component
@@ -124,7 +125,7 @@ class ConvertTightIneqsIntoEqsStep(Component):
if category not in self.classifiers:
continue
y[category] = []
# x_cat = np.array(x_cat)
x_cat = np.array(x_cat)
proba = self.classifiers[category].predict_proba(x_cat)
for i in range(len(proba)):
if proba[i][1] >= self.threshold: