{"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":"a0566530-7f16-5f63-bd5b-a1ee91a86f92","task_key":"default--v0~2e1~2e0~5fhf--a0566530-7f16-5f63-bd5b-a1ee91a86f92","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf a0566530-7f16-5f63-bd5b-a1ee91a86f92","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nimport numpy as np\\nimport statsmodels.api as sm\\ndef task_func(\\n    array: list, random_seed: int = 0\\n) -> (pd.DataFrame, sm.regression.linear_model.RegressionResultsWrapper):\\n\",\"complete_prompt\":\"import pandas as pd\\nimport numpy as np\\nimport statsmodels.api as sm\\n\\n\\ndef task_func(\\n    array: list, random_seed: int = 0\\n) -> (pd.DataFrame, sm.regression.linear_model.RegressionResultsWrapper):\\n    \\\"\\\"\\\"\\n    Generate a Pandas DataFrame from a 2D list and perform a multiple linear regression.\\n\\n    The function first validates the input list, creates a DataFrame, separates independent and dependent variables,\\n    adds a constant to the model, and fits a linear regression using statsmodels.\\n\\n    Parameters:\\n    - array (list of list of int): A 2D list where each sub-list represents a row of data.\\n                                   Each sub-list should have exactly 5 elements, where the first 4 elements are\\n                                   treated as independent variables ('A', 'B', 'C', 'D') and the last element is\\n                                   the dependent (Response) variable.\\n\\n    - random_seed (int): A seed for reproducibility in numpy for statsmodels. Defaults to 0.\\n\\n    Returns:\\n    - df (pd.DataFrame): DataFrame with columns 'A', 'B', 'C', 'D', 'Response'.\\n    - results (statsmodels.RegressionResults): Results of the linear regression.\\n\\n    Requirements:\\n    - pandas\\n    - numpy\\n    - statsmodels.api.sm\\n\\n    Example:\\n    >>> df, results = task_func([[1,2,3,4,5], [6,7,8,9,10]])\\n    >>> print(df)\\n       A  B  C  D  Response\\n    0  1  2  3  4         5\\n    1  6  7  8  9        10\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a Pandas DataFrame from a 2D list and perform a multiple linear regression. The function first validates the input list, creates a DataFrame, separates independent and dependent variables, adds a constant to the model, and fits a linear regression using statsmodels. - random_seed (int): A seed for reproducibility in numpy for statsmodels. Defaults to 0.\\nThe function should output with:\\n    df (pd.DataFrame): DataFrame with columns 'A', 'B', 'C', 'D', 'Response'.\\n    results (statsmodels.RegressionResults): Results of the linear regression.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nimport numpy as np\\nimport statsmodels.api as sm\\ndef task_func(\\n    array: list, random_seed: int = 0\\n) -> (pd.DataFrame, sm.regression.linear_model.RegressionResultsWrapper):\\n```\",\"libs\":\"['pandas', 'numpy', 'statsmodels']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}