@@ -6,30 +6,32 @@ class DMLDummyRegressor(BaseEstimator):
6
6
A dummy regressor that raises an AttributeError when attempting to access
7
7
its fit, predict, or set_params methods.
8
8
9
- Attributes
9
+ Parameters
10
10
----------
11
- _estimator_type : str
12
- Type of the estimator, set to "regressor".
13
11
14
- Methods
15
- -------
16
- fit(*args)
17
- Raises AttributeError: "Accessed fit method of DummyRegressor!"
18
- predict(*args)
19
- Raises AttributeError: "Accessed predict method of DummyRegressor!"
20
- set_params(*args)
21
- Raises AttributeError: "Accessed set_params method of DummyRegressor!"
22
12
"""
23
13
24
14
_estimator_type = "regressor"
25
15
26
16
def fit (* args ):
17
+ """
18
+ Raises AttributeError: "Accessed fit method of DummyRegressor!"
19
+ """
20
+
27
21
raise AttributeError ("Accessed fit method of DMLDummyRegressor!" )
28
22
29
23
def predict (* args ):
24
+ """
25
+ Raises AttributeError: "Accessed predict method of DummyRegressor!"
26
+ """
27
+
30
28
raise AttributeError ("Accessed predict method of DMLDummyRegressor!" )
31
29
32
30
def set_params (* args ):
31
+ """
32
+ Raises AttributeError: "Accessed set_params method of DummyRegressor!"
33
+ """
34
+
33
35
raise AttributeError ("Accessed set_params method of DMLDummyRegressor!" )
34
36
35
37
@@ -38,33 +40,37 @@ class DMLDummyClassifier(BaseEstimator):
38
40
A dummy classifier that raises an AttributeError when attempting to access
39
41
its fit, predict, set_params, or predict_proba methods.
40
42
41
- Attributes
43
+ Parameters
42
44
----------
43
- _estimator_type : str
44
- Type of the estimator, set to "classifier".
45
45
46
- Methods
47
- -------
48
- fit(*args)
49
- Raises AttributeError: "Accessed fit method of DummyClassifier!"
50
- predict(*args)
51
- Raises AttributeError: "Accessed predict method of DummyClassifier!"
52
- set_params(*args)
53
- Raises AttributeError: "Accessed set_params method of DummyClassifier!"
54
- predict_proba(*args, **kwargs)
55
- Raises AttributeError: "Accessed predict_proba method of DummyClassifier!"
56
46
"""
57
47
58
48
_estimator_type = "classifier"
59
49
60
50
def fit (* args ):
51
+ """
52
+ Raises AttributeError: "Accessed fit method of DummyClassifier!"
53
+ """
54
+
61
55
raise AttributeError ("Accessed fit method of DMLDummyClassifier!" )
62
56
63
57
def predict (* args ):
58
+ """
59
+ Raises AttributeError: "Accessed predict method of DummyClassifier!"
60
+ """
61
+
64
62
raise AttributeError ("Accessed predict method of DMLDummyClassifier!" )
65
63
66
64
def set_params (* args ):
65
+ """
66
+ Raises AttributeError: "Accessed set_params method of DummyClassifier!"
67
+ """
68
+
67
69
raise AttributeError ("Accessed set_params method of DMLDummyClassifier!" )
68
70
69
71
def predict_proba (* args , ** kwargs ):
72
+ """
73
+ Raises AttributeError: "Accessed predict_proba method of DummyClassifier!"
74
+ """
75
+
70
76
raise AttributeError ("Accessed predict_proba method of DMLDummyClassifier!" )
0 commit comments