{"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":"81442ff4-7d5c-5ffa-abc9-ca1007eadfae","task_key":"default--v0~2e1~2e0~5fhf--81442ff4-7d5c-5ffa-abc9-ca1007eadfae","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 81442ff4-7d5c-5ffa-abc9-ca1007eadfae","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nfrom sklearn.linear_model import LinearRegression\\nimport matplotlib.pyplot as plt\\ndef task_func(df1, df2, features=[\\\"feature1\\\", \\\"feature2\\\", \\\"feature3\\\"], target=\\\"target\\\"):\\n\",\"complete_prompt\":\"import pandas as pd\\nfrom sklearn.linear_model import LinearRegression\\nimport matplotlib.pyplot as plt\\n\\n\\ndef task_func(df1, df2, features=[\\\"feature1\\\", \\\"feature2\\\", \\\"feature3\\\"], target=\\\"target\\\"):\\n    \\\"\\\"\\\"\\n    Perform linear regression analysis with specified characteristics and targets.\\n    The function should merge two dataframes based on the 'id' column, perform\\n    linear regression using columns specified in features to predict the target,\\n    and plot the residuals.\\n\\n    Parameters:\\n    - df1 (DataFrame): The first dataframe containing columns 'id' and the features specified.\\n    - df2 (DataFrame): The second dataframe containing columns 'id' and target.\\n    - features (list of str, optional): List of feature column names. Default is ['feature1', 'feature2', 'feature3'].\\n    - target (str, optional): Name of the target column. Default is 'target'.\\n\\n    Returns:\\n    dict: A dictionary containing:\\n        - 'coefficients': Regression coefficients (list).\\n        - 'intercept': Regression intercept (float).\\n        - 'residuals_plot': A matplotlib Axes object representing the residuals plot, with the title 'Residuals Plot', x-axis label 'Predicted Values', and y-axis label 'Residuals'.\\n\\n    Requirements:\\n    - pandas\\n    - sklearn.linear_model.LinearRegression\\n    - matplotlib.pyplot\\n\\n    Example:\\n    >>> df1 = pd.DataFrame({'id': [1, 2, 3], 'feature1': [1.2, 3.4, 5.6], 'feature2': [2.3, 4.5, 6.7], 'feature3': [3.4, 5.6, 7.8]})\\n    >>> df2 = pd.DataFrame({'id': [1, 2, 3], 'target': [4.5, 6.7, 8.9]})\\n    >>> result = task_func(df1, df2)\\n    >>> result['coefficients']\\n    [0.3333333333333334, 0.33333333333333354, 0.3333333333333335]\\n    >>> type(result['residuals_plot'])\\n    <class 'matplotlib.axes._axes.Axes'>\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Perform linear regression analysis with specified characteristics and targets. The function should merge two dataframes based on the 'id' column, perform linear regression using columns specified in features to predict the target, and plot the residuals.\\nThe function should output with:\\n    dict: A dictionary containing:\\n    'coefficients': Regression coefficients (list).\\n    'intercept': Regression intercept (float).\\n    'residuals_plot': A matplotlib Axes object representing the residuals plot, with the title 'Residuals Plot', x-axis label 'Predicted Values', and y-axis label 'Residuals'.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nfrom sklearn.linear_model import LinearRegression\\nimport matplotlib.pyplot as plt\\ndef task_func(df1, df2, features=[\\\"feature1\\\", \\\"feature2\\\", \\\"feature3\\\"], target=\\\"target\\\"):\\n```\",\"libs\":\"['pandas', 'matplotlib', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}