load_occupancy

getml.datasets.load_occupancy(roles=False, as_pandas=False)[source]

Binary classification dataset on occupancy detection

The occupancy detection data set is a very simple multivariate time series from the UCI Machine Learning Repository. It is a binary classification problem. The task is to predict room occupancy from Temperature, Humidity, Light and CO2.

The original publication is: Candanedo, L. M., & Feldheim, V. (2016). Accurate occupancy detection of an office room from light, temperature, humidity and CO2 measurements using statistical learning models. Energy and Buildings, 112, 28-39.

Args:

as_pandas (bool):

Return data as pandas.DataFrame s

roles (bool):

Return data with roles set

Returns:

dict:

Dictionary containing the data as DataFrame s or pandas.DataFrame s (if as_pandas is True). The keys correspond to the name of the DataFrame on the engine. The following DataFrames are contained in the dictionary

  • train

  • validate

  • test

Examples:

>>> df_getml = getml.datasets.load_occupancy()
>>> type(df_getml["train"])
... getml.data.data_frame.DataFrame

For an full analysis of the occupancy dataset including all necessary preprocessing steps please refer to getml-examples.

Note:

Roles can be set ad-hoc by supplying the respective flag. If roles is False, all columns in the returned DataFrames s have roles unused_string or unused_float. This dataset contains no units. Before using them in an analysis, a data model needs to be constructed using Placeholder s.