{"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":"1c284408-3bcb-58e7-8770-c155fe7b952a","task_key":"default--v0~2e1~2e0~5fhf--1c284408-3bcb-58e7-8770-c155fe7b952a","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 1c284408-3bcb-58e7-8770-c155fe7b952a","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nfrom sklearn.model_selection import train_test_split\\nfrom sklearn.linear_model import LogisticRegression\\nfrom sklearn.metrics import confusion_matrix\\nimport numpy as np\\nimport matplotlib.pyplot as plt\\ndef task_func(feature: pd.Series, target: pd.Series) -> (np.ndarray, plt.Axes):\\n\",\"complete_prompt\":\"import pandas as pd\\nfrom sklearn.model_selection import train_test_split\\nfrom sklearn.linear_model import LogisticRegression\\nfrom sklearn.metrics import confusion_matrix\\nimport numpy as np\\nimport matplotlib.pyplot as plt\\n\\n\\ndef task_func(feature: pd.Series, target: pd.Series) -> (np.ndarray, plt.Axes):\\n    \\\"\\\"\\\"\\n    Train a logistic regression model on one feature and evaluate its performance using a confusion matrix plot.\\n    The function takes a feature and a target series, splits them into training and testing sets, trains the logistic\\n    regression model, predicts the target for the test set, and plots the confusion matrix.\\n\\n    Parameters:\\n    feature (pd.Series): Series representing the single feature for the logistic regression model.\\n    target (pd.Series): Series representing the target variable.\\n\\n    Returns:\\n    (np.ndarray, plt.Axes): A tuple containing the confusion matrix and the matplotlib Axes object of the confusion matrix plot.\\n\\n    Requirements:\\n    - pandas\\n    - sklearn.model_selection.train_test_split\\n    - sklearn.linear_model.LogisticRegression\\n    - sklearn.metrics.confusion_matrix\\n    - numpy\\n    - matplotlib.pyplot\\n\\n    Example:\\n    >>> feature = pd.Series(np.random.rand(1000)) # Feature data\\n    >>> target = pd.Series(np.random.randint(0, 2, size=1000)) # Target data (binary)\\n    >>> cm, ax = task_func(feature, target)\\n    >>> ax.get_title()\\n    'Confusion Matrix'\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Train a logistic regression model on one feature and evaluate its performance using a confusion matrix plot. The function takes a feature and a target series, splits them into training and testing sets, trains the logistic regression model, predicts the target for the test set, and plots the confusion matrix.\\nThe function should output with:\\n    (np.ndarray, plt.Axes): A tuple containing the confusion matrix and the matplotlib Axes object of the confusion matrix plot.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nfrom sklearn.model_selection import train_test_split\\nfrom sklearn.linear_model import LogisticRegression\\nfrom sklearn.metrics import confusion_matrix\\nimport numpy as np\\nimport matplotlib.pyplot as plt\\ndef task_func(feature: pd.Series, target: pd.Series) -> (np.ndarray, plt.Axes):\\n```\",\"libs\":\"['pandas', 'numpy', '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":[]}