Skip to content

Commit 99ee684

Browse files
committed
Added legacy warning and removed Generative fitting
1 parent 8918129 commit 99ee684

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dirichletcal/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
class DirichletCalibrator(BaseEstimator, RegressorMixin):
1212
def __init__(self, matrix_type='full', l2=0.0, comp_l2=False,
1313
initializer='identity'):
14-
if matrix_type not in ['full', 'full_gen', 'diagonal',
15-
'fixed_diagonal']:
14+
print(('WARNING: DirichletCalibrator class is legacy code and needs' +
15+
'to be tested. Use the classes defined in dirichletcal.calib' +
16+
'instead.'))
17+
if matrix_type not in ['full', 'diagonal', 'fixed_diagonal']:
1618
raise ValueError
1719
self.matrix_type = matrix_type
1820
self.l2 = l2
@@ -45,8 +47,6 @@ def fit(self, x, y, x_val=None, y_val=None, **kwargs):
4547
self.calibrator_ = FullDirichletCalibrator(
4648
reg_lambda_list=self.l2_grid, reg_mu_list=self.comp_l2,
4749
initializer=self.initializer)
48-
elif self.matrix_type == 'full_gen':
49-
self.calibrator_ = GenerativeDirichletCalibrator()
5050
else:
5151
raise ValueError
5252

0 commit comments

Comments
 (0)