load_sedative1000_data

load_sedative1000_data#

MDDC.datasets.load_sedative1000_data(desc=False, as_dataframe=True)#

A 1001 by 11 data matrix of a contingency table processed from FDA Adverse Event Reporting System (FAERS) database from the first quarter of 2021 to the fourth quarter of 2023.

Read more in the User Guide.

Parameters#

descboolean, optional

If set to True, the function will return the description along with the data. If set to False, the description will not be included. Defaults to False.

as_dataframeboolean, optional

Determines whether the function should return the data as a pandas DataFrame (Trues) or as a numpy array (False). Defaults to True.

Returns#

datapandas.DataFrame, if as_dataframe is True

Dataframe of the data with shape (n_samples, n_features + class).

(desc, data)tuple, if desc is True.

If as_dataframe is True, a tuple containing the description and a pandas.DataFrame with shape (1001, 11) is returned. If as_dataframe is False, a numpy.ndarray with shape (1001, 11) is returned along with the description.

Data Source#

The quarterly files can be found at https://fis.fda.gov/extensions/FPD-QDE-FAERS/FPD-QDE-FAERS.html .

Examples#

>>> from MDDC.datasets import load_sedative1000_data
>>> sedative = load_sedative1000_data()