{"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":"6a149afb-ac30-53a9-b2f3-18a3cf28c50d","task_key":"default--v0~2e1~2e0~5fhf--6a149afb-ac30-53a9-b2f3-18a3cf28c50d","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 6a149afb-ac30-53a9-b2f3-18a3cf28c50d","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"from sklearn.cluster import KMeans\\nimport matplotlib.pyplot as plt\\ndef task_func(df1, df2, column1=\\\"feature1\\\", column2=\\\"feature2\\\"):\\n\",\"complete_prompt\":\"from sklearn.cluster import KMeans\\nimport matplotlib.pyplot as plt\\n\\n\\ndef task_func(df1, df2, column1=\\\"feature1\\\", column2=\\\"feature2\\\"):\\n    \\\"\\\"\\\"Merge datasets, perform KMeans clustering, then return cluster labels and scatterplot.\\n\\n    Each dataset is assumed to contain at least one id column and one feature column. The column to process\\n    is specified for df1 and df2 via column1 and column2, respectively. KMeans clustering is applied\\n    with k=2 and n_init=10. Resulting scatterplot shows column1 on the x-axis, column2 on the y-axis,\\n    and predicted cluster as color.\\n\\n    Parameters:\\n    - df1 (pd.DataFrame): Dataframe with columns 'id' and feature columns including column1.\\n    - df2 (pd.DataFrame): Dataframe with columns 'id' and feature columns including column2.\\n    - column1 (str): Name of column containing features to model in df1. Defaults to \\\"feature1\\\".\\n    - column2 (str): Name of column containing features to model in df2. Defaults to \\\"feature2\\\".\\n\\n    Returns:\\n    - labels (numpy.ndarray): Cluster labels for each data point (dtype=int32).\\n    - ax (matplotlib.axes._axes.Axes): The plotted figure's Axes object.\\n\\n    Requirements:\\n    - sklearn.cluster.KMeans\\n    - matplotlib.pyplot\\n\\n    Example:\\n    >>> df1 = pd.DataFrame({'id': [1, 2, 3], 'feature1': [1.2, 3.4, 5.6]})\\n    >>> df2 = pd.DataFrame({'id': [1, 2, 3], 'feature2': [2.3, 4.5, 6.7]})\\n    >>> labels, ax = task_func(df1, df2)\\n    >>> type(labels)\\n    <class 'numpy.ndarray'>\\n    >>> type(ax)\\n    <class 'matplotlib.axes._axes.Axes'>\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Merge datasets, perform KMeans clustering, then return cluster labels and scatterplot. Each dataset is assumed to contain at least one id column and one feature column. The column to process is specified for df1 and df2 via column1 and column2, respectively. KMeans clustering is applied with k=2 and n_init=10. Resulting scatterplot shows column1 on the x-axis, column2 on the y-axis, and predicted cluster as color.\\nThe function should output with:\\n    labels (numpy.ndarray): Cluster labels for each data point (dtype=int32).\\n    ax (matplotlib.axes._axes.Axes): The plotted figure's Axes object.\\nYou should write self-contained code starting with:\\n```\\nfrom sklearn.cluster import KMeans\\nimport matplotlib.pyplot as plt\\ndef task_func(df1, df2, column1=\\\"feature1\\\", column2=\\\"feature2\\\"):\\n```\",\"libs\":\"['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":[]}