{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"93278950-31c4-58f0-a481-670168a09c64","task_key":"default--v0~2e1~2e0~5fhf--93278950-31c4-58f0-a481-670168a09c64","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 93278950-31c4-58f0-a481-670168a09c64","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nfrom sklearn.model_selection import cross_val_score\\nfrom sklearn.ensemble import RandomForestRegressor\\ndef task_func(num_samples=100, n_estimators=100, random_seed=None, cv=5):\\n\",\"complete_prompt\":\"import numpy as np\\nfrom sklearn.model_selection import cross_val_score\\nfrom sklearn.ensemble import RandomForestRegressor\\n\\ndef task_func(num_samples=100, n_estimators=100, random_seed=None, cv=5):\\n    '''\\n    Generate a dataset with five features sampled from the standard normal\\n    distribution and a target variable.\\n    The target value is created by computing the sum of the features and adding\\n    random numbers sampled from the standard normal distribution.\\n    Then cross-validate the dataset using a RandomForestRegressor model and\\n    return the mean cross-validation score.\\n\\n    Parameters:\\n    - num_samples (int): Number of samples in the generated dataset. Default is 100.\\n    - n_estimators (int): Number of trees in RandomForestRegressor. Default is 100.\\n    - random_seed (int): Seed for random number generation. Default is None.\\n    - cv (int): Number of cross-validation folds. Default is 5.\\n\\n    Returns:\\n    float: The mean cross-validation score.\\n    model: the trained model\\n\\n    Raises:\\n    - ValueError: If num_samples / cv < 2\\n\\n    Requirements:\\n    - numpy\\n    - sklearn.model_selection.cross_val_score\\n    - sklearn.ensemble.RandomForestRegressor\\n\\n    Example:\\n    >>> res = task_func(random_seed=21, cv=3, n_estimators=90, num_samples=28)\\n    >>> print(res)\\n    (-0.7631373607354236, RandomForestRegressor(n_estimators=90, random_state=21))\\n\\n    >>> results = task_func(random_seed=1)\\n    >>> print(results)\\n    (0.47332912782858, RandomForestRegressor(random_state=1))\\n    '''\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a dataset with five features sampled from the standard normal distribution and a target variable. The target value is created by computing the sum of the features and adding random numbers sampled from the standard normal distribution. Then cross-validate the dataset using a RandomForestRegressor model and return the mean cross-validation score. >>> results = task_func(random_seed=1) >>> print(results) (0.47332912782858, RandomForestRegressor(random_state=1))\\nThe function should raise the exception for: ValueError: If num_samples / cv < 2\\nThe function should output with:\\n    float: The mean cross-validation score.\\n    model: the trained model\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nfrom sklearn.model_selection import cross_val_score\\nfrom sklearn.ensemble import RandomForestRegressor\\ndef task_func(num_samples=100, n_estimators=100, random_seed=None, cv=5):\\n```\",\"libs\":\"['numpy', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}