Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Online ml River Datasets Restaurants

From Leeroopedia
Revision as of 16:07, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Online_ml_River_Datasets_Restaurants.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Knowledge Sources
Domains Online_Learning, Datasets, Regression, Time_Series
Last Updated 2026-02-08 16:00 GMT

Overview

Concrete dataset for regression provided by the River library.

Description

Data from the Kaggle Recruit Restaurants challenge. The goal is to predict the number of visitors in each of 829 Japanese restaurants over a period of roughly 16 weeks. The data is ordered by date and then by restaurant ID.

This dataset contains 252,108 samples with 7 features for regression tasks.

Usage

This dataset is useful for:

  • Time series forecasting with multiple entities
  • Restaurant visitor prediction
  • Demand forecasting in hospitality industry
  • Multi-entity time series problems

Code Reference

Source Location

Signature

class Restaurants(base.RemoteDataset):
    def __init__(self):
        super().__init__(
            n_samples=252_108,
            n_features=7,
            task=base.REG,
            url="https://maxhalford.github.io/files/datasets/kaggle_recruit_restaurants.zip",
            size=28_881_242,
            filename="kaggle_recruit_restaurants.csv",
        )

    def _iter(self):
        return stream.iter_csv(
            self.path,
            target="visitors",
            converters={
                "latitude": float,
                "longitude": float,
                "visitors": int,
                "is_holiday": ast.literal_eval,
            },
            parse_dates={"date": "%Y-%m-%d"},
        )

Import

from river import datasets
dataset = datasets.Restaurants()

I/O Contract

Inputs

Name Type Required Description
(none) No parameters needed

Outputs

Name Type Description
iter() tuple(dict, int) Yields (features_dict, target) pairs where target is visitor count

Dataset Properties

Property Value
Number of samples 252,108
Number of features 7
Task Regression
Format CSV (compressed)
Size 28,881,242 bytes
Number of restaurants 829
Time period ~16 weeks

Features

The dataset includes the following features:

  • date: Date of the observation (datetime)
  • latitude: Restaurant latitude (float)
  • longitude: Restaurant longitude (float)
  • is_holiday: Whether the date is a holiday (boolean)
  • Restaurant identification features
  • visitors: Number of visitors (target variable, integer)

Usage Examples

from river import datasets

dataset = datasets.Restaurants()
for x, y in dataset:
    print(x, y)
    break

References

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment