Load the Heart Disease dataset (Statlog) from the installed package data.
| Parameters: |
-
return_X_y
(bool, default:
True
)
–
If True, returns (X, y). If False, returns a Bunch object.
-
as_frame
(bool, default:
True
)
–
If True, returns pandas objects (DataFrame / Series).
If False, returns NumPy arrays.
-
preprocessed
(bool, default:
True
)
–
If True, one-hot encode categorical columns and standardize
numerical columns before returning. The sensitive column is
encoded in place and kept in X.
-
target_column
(str, default:
"heart_disease"
)
–
Name of the target column.
|
| Returns: |
-
data( Bunch or (X, y)
) –
If return_X_y is True, returns (X, y) where X is a DataFrame
(or ndarray when as_frame=False) that includes the sensitive column.
If return_X_y is False, returns a Bunch with fields:
data : features including sensitive column (DataFrame or ndarray)
target : target (Series or ndarray)
frame : full DataFrame with features and target
feature_names : list of feature column names
DESCR : short description string
|