@@ -53,24 +53,49 @@ class DMLOptunaResult:
5353 """
5454 Container for Optuna search results.
5555
56- Attributes
56+ This dataclass holds the results of Optuna-based hyperparameter tuning,
57+ including the best estimator, parameters, score, and the complete study history.
58+
59+ Parameters
5760 ----------
5861 learner_name : str
5962 Name of the learner passed (e.g., 'ml_g').
63+
6064 params_name : str
6165 Name of the nuisance parameter being tuned (e.g., 'ml_g0').
66+
6267 best_estimator : object
6368 The estimator instance with the best found hyperparameters set (not fitted).
69+
6470 best_params : dict
6571 The best hyperparameters found during tuning.
72+
6673 best_score : float
6774 The best average cross-validation score achieved during tuning.
75+
6876 scoring_method : str or callable
6977 The scoring method used during tuning.
78+
7079 study : optuna.study.Study
7180 The Optuna study object containing the tuning history.
81+
7282 tuned : bool
7383 Indicates whether tuning was performed (True) or skipped (False).
84+
85+ Examples
86+ --------
87+ >>> from doubleml.utils import DMLOptunaResult
88+ >>> # After running Optuna tuning
89+ >>> result = DMLOptunaResult(
90+ ... learner_name='ml_g',
91+ ... params_name='ml_g0',
92+ ... best_estimator=estimator,
93+ ... best_params={'max_depth': 5},
94+ ... best_score=0.85,
95+ ... scoring_method='neg_mean_squared_error',
96+ ... study=study,
97+ ... tuned=True
98+ ... )
7499 """
75100
76101 learner_name : str
0 commit comments