Skip to content

Commit d28f52e

Browse files
committed
more instantiations
1 parent 7da9c34 commit d28f52e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sklearn/utils/estimator_checks.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ def check_fit_score_takes_y(name, estimator):
739739
assert_true(args[1] in ["y", "Y"],
740740
"Expected y or Y as second argument for method "
741741
"%s of %s. Got arguments: %r."
742-
% (func_name, estimator.__name__, args))
742+
% (func_name, type(estimator).__name__, args))
743743

744744

745745
@ignore_warnings
@@ -1460,7 +1460,7 @@ def check_parameters_default_constructible(name, Estimator):
14601460
# get rid of deprecation warnings
14611461
with ignore_warnings(category=DeprecationWarning):
14621462
if name in META_ESTIMATORS:
1463-
estimator = Estimator(LinearDiscriminantAnalysis)
1463+
estimator = Estimator(LinearDiscriminantAnalysis())
14641464
else:
14651465
estimator = Estimator()
14661466
# test cloning
@@ -1612,7 +1612,7 @@ def transform(self, X):
16121612
return
16131613

16141614
else:
1615-
e = estimator()
1615+
e = clone(estimator)
16161616

16171617
shallow_params = e.get_params(deep=False)
16181618
deep_params = e.get_params(deep=True)

0 commit comments

Comments
 (0)