{"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":"372aa797-186a-56ed-9f9a-211de1cd3994","task_key":"default--v0~2e1~2e0~5fhf--372aa797-186a-56ed-9f9a-211de1cd3994","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 372aa797-186a-56ed-9f9a-211de1cd3994","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nfrom sklearn.linear_model import LinearRegression\\nfrom sklearn.model_selection import train_test_split\\ndef task_func(csv_file_path, attribute, test_size=0.2, random_state=42):\\n\",\"complete_prompt\":\"import pandas as pd\\nfrom sklearn.linear_model import LinearRegression\\nfrom sklearn.model_selection import train_test_split\\n\\n\\ndef task_func(csv_file_path, attribute, test_size=0.2, random_state=42):\\n    \\\"\\\"\\\"\\n    Train a linear regression model on a dataset and predict the value of a particular attribute.\\n    This function reads a CSV file to create a pandas DataFrame, separates the data into \\n    training and testing sets, and performs linear regression. It returns the predicted \\n    values for the testing set as well as the trained model.\\n\\n    Parameters:\\n    csv_file_path (str): The path to the CSV file containing the data set.\\n    attribute (str): The attribute to predict.\\n    test_size (float, optional): Proportion of the dataset to include in the test split. Default is 0.2.\\n    random_state (int, optional): Seed used by the random number generator. Default is 42.\\n\\n    Returns:\\n    tuple: A tuple containing:\\n        - model (LinearRegression): The trained linear regression model.\\n        - predictions (ndarray): An array of predicted values for the test set.\\n\\n    Requirements:\\n    - pandas\\n    - sklearn.linear_model\\n    - sklearn.model_selection\\n\\n    Note: The function assumes that the CSV file is correctly formatted and that the specified attribute exists.\\n\\n    Example:\\n    >>> model, predictions = task_func(\\\"/path/to/data.csv\\\", \\\"target\\\")\\n    >>> print(predictions)\\n    [123.45, ..., 126.78]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Train a linear regression model on a dataset and predict the value of a particular attribute. This function reads a CSV file to create a pandas DataFrame, separates the data into training and testing sets, and performs linear regression. It returns the predicted values for the testing set as well as the trained model.\\nNote that: The function assumes that the CSV file is correctly formatted and that the specified attribute exists.\\nThe function should output with:\\n    tuple: A tuple containing:\\n    model (LinearRegression): The trained linear regression model.\\n    predictions (ndarray): An array of predicted values for the test set.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nfrom sklearn.linear_model import LinearRegression\\nfrom sklearn.model_selection import train_test_split\\ndef task_func(csv_file_path, attribute, test_size=0.2, random_state=42):\\n```\",\"libs\":\"['pandas', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}