{"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":"cc3787d3-82cb-5a3b-8dcd-6ab8392f29e0","task_key":"default--v0~2e1~2e0~5fhf--cc3787d3-82cb-5a3b-8dcd-6ab8392f29e0","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf cc3787d3-82cb-5a3b-8dcd-6ab8392f29e0","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import pandas as pd\\nfrom sklearn.model_selection import train_test_split\\nfrom sklearn.ensemble import RandomForestClassifier\\nfrom sklearn.metrics import classification_report\\ndef task_func(csv_file_path, target_column=\\\"target\\\", test_size=0.2, n_estimators=100):\\n\",\"complete_prompt\":\"import pandas as pd\\nfrom sklearn.model_selection import train_test_split\\nfrom sklearn.ensemble import RandomForestClassifier\\nfrom sklearn.metrics import classification_report\\n\\n\\ndef task_func(csv_file_path, target_column=\\\"target\\\", test_size=0.2, n_estimators=100):\\n    \\\"\\\"\\\"\\n    Processes a CSV file to train a Random Forest classifier and generates a formatted classification report.\\n\\n    Parameters:\\n        csv_file_path (str): The path to the CSV file containing the data.\\n        target_column (str, optional): The name of the target variable column. Defaults to 'target'.\\n        test_size (float, optional): The proportion of the dataset to include in the test split. Defaults to 0.2.\\n        n_estimators (int, optional): The number of trees in the RandomForestClassifier. Defaults to 100.\\n\\n    Returns:\\n        str: A formatted classification report. The report includes metrics such as precision, recall,\\n             f1-score for each class, as well as overall accuracy, macro average, and weighted average.\\n\\n    Raises:\\n        ValueError: If the specified target_column is not found in the CSV file.\\n\\n    Requirements:\\n        - pandas\\n        - sklearn\\n\\n    Example:\\n    >>> report = task_func('/path/to/data.csv')\\n    >>> print(report)\\n    class 0        0.88       0.90       0.89          50\\n    class 1        0.89       0.87       0.88          48\\n    ...\\n    accuracy                           0.89         100\\n    macro avg       0.88       0.89       0.88         100\\n    weighted avg    0.89       0.89       0.89         100\\n\\n    Note:\\n        The CSV file must have a column with the name specified by 'target_column', and it should be in a\\n        format readable by pandas.read_csv().\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Processes a CSV file to train a Random Forest classifier and generates a formatted classification report.\\nNote that: The CSV file must have a column with the name specified by 'target_column', and it should be in a format readable by pandas.read_csv().\\nThe function should raise the exception for: ValueError: If the specified target_column is not found in the CSV file.\\nThe function should output with:\\n    str: A formatted classification report. The report includes metrics such as precision, recall,\\n    f1-score for each class, as well as overall accuracy, macro average, and weighted average.\\nYou should write self-contained code starting with:\\n```\\nimport pandas as pd\\nfrom sklearn.model_selection import train_test_split\\nfrom sklearn.ensemble import RandomForestClassifier\\nfrom sklearn.metrics import classification_report\\ndef task_func(csv_file_path, target_column=\\\"target\\\", test_size=0.2, n_estimators=100):\\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":[]}