{"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":"f83c4190-8a56-5682-b889-27cb6245d18d","task_key":"default--v0~2e1~2e0~5fhf--f83c4190-8a56-5682-b889-27cb6245d18d","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf f83c4190-8a56-5682-b889-27cb6245d18d","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nimport matplotlib.pyplot as plt\\n# Constants\\nNUM_SAMPLES = 100\\nNUM_OUTLIERS = 5\\ndef task_func(num_samples=NUM_SAMPLES, num_outliers=NUM_OUTLIERS):\\n\",\"complete_prompt\":\"import numpy as np\\nimport matplotlib.pyplot as plt\\n\\n# Constants\\nNUM_SAMPLES = 100\\nNUM_OUTLIERS = 5\\n\\n\\ndef task_func(num_samples=NUM_SAMPLES, num_outliers=NUM_OUTLIERS):\\n    \\\"\\\"\\\"\\n    Generate a dataset comprising both normal data and artificially introduced outliers,\\n    and plot a histogram of the combined data. The function detects outliers in the dataset\\n    using the Interquartile Range (IQR) method, but it only considers the normally distributed\\n    portion of the data for outlier detection. The outliers detected and the artificially\\n    introduced outliers might not always coincide.\\n\\n    Parameters:\\n    - num_samples (int): Number of samples to be drawn from a normal distribution. The default \\n      value is 100. If set to zero or a negative number, no normal data will be generated, \\n      and the dataset will only contain artificially introduced outliers.\\n    - num_outliers (int): Number of outliers to be artificially introduced into the dataset. \\n      These outliers are uniformly distributed between -10 and 10. The default value is 5. \\n      If set to zero, no outliers will be artificially introduced.\\n\\n\\n    Returns:\\n    - data (numpy array): The combined dataset, including both normally distributed data and \\n      the artificially introduced outliers.\\n    - outliers_detected (numpy array): The outliers detected using the IQR method. This \\n      detection is based solely on the normally distributed portion of the data.\\n    - ax (matplotlib.axes._axes.Axes): The Axes object for the histogram \\n      plot of the combined dataset.\\n\\n    Requirements:\\n    - numpy\\n    - matplotlib\\n\\n    Note:\\n    - The artificially introduced outliers are not necessarily the same as the outliers\\n    detected by the IQR method. The IQR method is applied only to the normally distributed\\n    data, and thus some of the artificially introduced outliers may not be detected,\\n    and some normal data points may be falsely identified as outliers.\\n\\n    Example:\\n    >>> import numpy as np\\n    >>> np.random.seed(0)\\n    >>> data, outliers_detected, ax = task_func()\\n    >>> print(outliers_detected)\\n    [-9.61613603 -3.96850367  3.20347075]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a dataset comprising both normal data and artificially introduced outliers, and plot a histogram of the combined data. The function detects outliers in the dataset using the Interquartile Range (IQR) method, but it only considers the normally distributed portion of the data for outlier detection. The outliers detected and the artificially introduced outliers might not always coincide.\\nNote that: The artificially introduced outliers are not necessarily the same as the outliers detected by the IQR method. The IQR method is applied only to the normally distributed data, and thus some of the artificially introduced outliers may not be detected, and some normal data points may be falsely identified as outliers.\\nThe function should output with:\\n    data (numpy array): The combined dataset, including both normally distributed data and\\n    the artificially introduced outliers.\\n    outliers_detected (numpy array): The outliers detected using the IQR method. This\\n    detection is based solely on the normally distributed portion of the data.\\n    ax (matplotlib.axes._axes.Axes): The Axes object for the histogram\\n    plot of the combined dataset.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nimport matplotlib.pyplot as plt\\n# Constants\\nNUM_SAMPLES = 100\\nNUM_OUTLIERS = 5\\ndef task_func(num_samples=NUM_SAMPLES, num_outliers=NUM_OUTLIERS):\\n```\",\"libs\":\"['numpy', 'matplotlib']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}