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 ChickWeights

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


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

Overview

Concrete dataset for regression provided by the River library.

Description

Chick weights along time. The stream contains 578 items and 3 features. The goal is to predict the weight of each chick along time, according to the diet the chick is on. The data is ordered by time and then by chick.

This dataset contains 578 samples with 3 features for regression tasks.

Usage

This dataset is useful for:

  • Time series regression with grouped data
  • Growth prediction modeling
  • Studying effects of different treatments (diets) on outcomes
  • Educational examples of longitudinal data analysis

Code Reference

Source Location

Signature

class ChickWeights(base.FileDataset):
    def __init__(self):
        super().__init__(filename="chick-weights.csv", n_samples=578, n_features=3, task=base.REG)

    def __iter__(self):
        return stream.iter_csv(
            self.path,
            target="weight",
            converters={"time": int, "weight": int, "chick": int, "diet": int},
        )

Import

from river import datasets
dataset = datasets.ChickWeights()

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 the chick weight

Dataset Properties

Property Value
Number of samples 578
Number of features 3
Task Regression
Format CSV

Features

The dataset includes the following features:

  • time: Time point (integer)
  • chick: Chick identifier (integer)
  • diet: Diet type (integer)
  • weight: Weight of the chick (target variable, integer)

Usage Examples

from river import datasets

dataset = datasets.ChickWeights()
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