[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify the code snippets into categories from the provided list of categories. List of categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']"}, {'role': 'user', 'content': 'Identify to which category the provided code belongs and assign the code snippet to at least 1 but up to 5 categories based on the probabilities, ignore if the probability of the category is negligible. Strictly provide your response as a list. Avoid providing any additional information, commentary, or personal opinions.\\nPython Code:class AdolescentsAnalysis(AnalysisBase):\n"""\nAnalysis of how adolescent feels about their parents and their risky behaviors.\nParameters\n----------\ndataset : string\nFile name of the dataset.\nusecols : list\nList of column names that are of interests.\ndebug : boolean\nPrint extra data for debug purpose.\ninput_var : dict\nKey-Value pairs used as input variables.\nKey, description of column.\nValue, column code used in original dataset.\noutput_var : dict\nKey-Value pairs used as output variables.\nKey, description of column.\nValue, column code used in original dataset.\nSee also\n--------\nAnalysisBase\nBase class for initializing data, settings and cleaning data\n"""\ndef __init__(self, dataset, usecols=None, debug=False, input_var=None, output_var=None):\nsuper().__init__(dataset, usecols=usecols, debug=debug, input_var=input_var, output_var=output_var)\nself.adolescent_feelings = OrderedDict([\n("1-AGREE", "\\nAdolescents agree both parents are loving"),\n("2-NEUTRAL", "\\nAdolescents neither agree nor disagree both parents are loving"),\n("3-DISAGREE", "\\nAdolescents disagree both parents are loving")])\ndef print_group_stat(self, x_vars, y, debug=False):\n"""\nCalculate percentages of each category x_vars against y from the dataset.\nParameters\n----------\nx_vars : Dict\nKey, categories of how adolescents feel about having loving parents, e.g.\n1-AGREE, 2-NEUTRAL, 3-DISAGREE.\nValue, Description of the key.\ny : String\nColumn Label of dataset.\ndebug : Boolean\nPrint extra data for debug purpose.\nReturns\n-------\nNone\n"""\nif not debug:\ndebug = self.debug\nfor k, v in x_vars.items():\nprint(v, "(0: No, 1: Yes)\\n")\nsubset = self.cleaned_data.copy()\nsubset = subset[subset["loving_parents"] == k]\nsubset = subset[(subset[y] <= 1)]\nprint(subset.shape) if debug else False\nprint(subset[y].value_counts(normalize=True).sort_index())\nprint()\ndef graph_bar_chart(self, dataset, x_independent_var, y_dependent_var, x_label, y_label, title, filename=None):\n"""\nDraw a categorical bar chart.\nSave the graph optionally if filename is supplied.\nParameters\n----------\ndataset : Pandas DataFrame\nCleaned dataset.\nx_independent_var : String\nColumn Label for x variable.\ny_dependent_var : String\nColumn Label for y variable.\nx_label : String\nDescription for x axis.\ny_label : String\nDescription for y axis.\ntitle : String\nTitle of the graph.\nfilename : String\nFile name used for saving the plot.\nReturns\n-------\nNone\n"""\ng = sns.factorplot(y=y_dependent_var, x=x_independent_var, data=dataset, kind="bar", ci=None, size=7, aspect=1)\nplt.xlabel(x_label)\nplt.ylabel(y_label)\nplt.title(title)\nif filename:\ng.savefig(filename, dpi=300)\ndef adolescents_feel_vs_sex_in_the_past(self, filename=None, debug=False):\n"""\nThis function is to explore the relative frequencies related to the following question:\nHow the adolescent feel about his/her parent\nvs\nif he/she engaged in sexual intercourse (H1CO1)?\nA bar chart is also created to help for visualization.\nParameters\n----------\nfilename : String\nFilename for saving graph to disk.\ndebug : Boolean\nPrint extra data for debug purpose.\nReturns\n-------\nNone\n"""\nif not debug:\ndebug = self.debug\nx_independent_var = "loving_parents"\ny_dependent_var = "had_sexual_intercourse"\nx_vars = OrderedDict(((k, v + ", and had sex in the past")\nfor k, v in self.adolescent_feelings.items()))\nself.print_group_stat(x_vars, y_dependent_var, debug)\nsubset = self.cleaned_data.copy()\nsubset[x_independent_var] = subset[x_independent_var].astype("category")\nsubset = subset[(subset[y_dependent_var] <= 1)]\nx_label = "Adolescents feel love from both parents"\ny_label = "Adolescents had sexual intercourse"\ntitle = "Adolescent\'s Relationship with Parents\\nvs\\nHad Sexual Intercourse Experience"\nself.graph_bar_chart(subset, x_independent_var, y_dependent_var,\nx_label, y_label, title, filename)\ndef adolescents_feel_vs_use_birth_control_the_first_time(self, filename=None, debug=False):\n"""\nThis function is to explore the relative frequencies related to the following question:\nHow the adolescent feel about his/her parent\nvs\nif he/she used any method of birth control the first time he/she had sexual intercourse (H1CO3)?\nA bar chart is also created to help for visualization.\nParameters\n----------\nfilename : String\nFilename for saving graph to disk.\ndebug : Boolean\nPrint extra data for debug purpose.\nReturns\n-------\nNone\n"""\nif not debug:\ndebug = self.debug\nx_independent_var = "loving_parents"\ny_dependent_var = "used_birth_control_first_time"\nx_vars = OrderedDict(((k, v + ", and used birth control during first time sex")\nfor k, v in self.adolescent_feelings.items()))\nself.print_group_stat(x_vars, y_dependent_var, debug)\nsubset = self.cleaned_data.copy()\nsubset[x_independent_var] = subset[x_independent_var].astype("category")\nsubset = subset[(subset[y_dependent_var] <= 1)]\nx_label = "Adolescents feel love from both parents"\ny_label = "Adolescents used birth control during first time sex"\ntitle = "Adolescent\'s Relationship with Parents\\nvs\\nBirth Control during First Time Sex"\nself.graph_bar_chart(subset, x_independent_var, y_dependent_var,\nx_label, y_label, title, filename)\ndef adolescents_feel_vs_use_birth_control_recently(self, filename=None, debug=False):\n"""\nThis function is to explore the relative frequencies related to the following question:\nHow the adolescent feel about his/her parent\nvs\nif he/she used any method of birth control during recent sex (H1CO6)?\nA bar chart is also created to help for visualization.\nParameters\n----------\nfilename : String\nFilename for saving graph to disk.\ndebug : Boolean\nPrint extra data for debug purpose.\nReturns\n-------\nNone\n"""\nif not debug:\ndebug = self.debug\nx_independent_var = "loving_parents"\ny_dependent_var = "used_birth_control_most_recently"\nx_vars = OrderedDict(((k, v + ", and used birth control during recent sex")\nfor k, v in self.adolescent_feelings.items()))\nself.print_group_stat(x_vars, y_dependent_var, debug)\nsubset = self.cleaned_data.copy()\nsubset[x_independent_var] = subset[x_independent_var].astype("category")\nsubset = subset[(subset[y_dependent_var] <= 1)]\nx_label = "Adolescents feel love from both parents"\ny_label = "Adolescents used birth control during recent sex"\ntitle = "Adolescent\'s Relationship with Parents\\nvs\\nBirth Control During Recent Sex"\nself.graph_bar_chart(subset, x_independent_var, y_dependent_var,\nx_label, y_label, title, filename)\ndef adolescents_feel_vs_cocaine_usage(self, filename=None, debug=False):\n"""\nThis function is to explore the relative frequencies related to the following question:\nHow the adolescent feel about his/her parent\nvs\nif he/she used cocaine at least once before (H1TO35)?\nA bar chart is also created to help for visualization.\nParameters\n----------\nfilename : String\nFilename for saving graph to disk.\ndebug : Boolean\nPrint extra data for debug purpose.\nReturns\n-------\nNone\n"""\n""" Adolescents feel love and warmth from both parents: 1-AGREE, 2-NEUTRAL, 3-DISAGREE\nvs\nAdolescents used cocaine at least once\n"""\nif not debug:\ndebug = self.debug\nx_independent_var = "loving_parents"\ny_dependent_var = "USED_COCAINE"\nx_vars = OrderedDict(((k, v + ", and used cocaine in the past")\nfor k, v in self.adolescent_feelings.items()))\nself.print_group_stat(x_vars, y_dependent_var, debug)\nsubset = self.cleaned_data.copy()\nsubset[x_independent_var] = subset[x_independent_var].astype("category")\nx_label = "Adolescents feel love from both parents"\ny_label = "Adolescents used cocaine in the past"\ntitle = "Adolescent\'s Relationship with Parents\\nvs\\nUsed Cocaine in the Past"\nself.graph_bar_chart(subset, x_independent_var, y_dependent_var,\nx_label, y_label, title, filename)'}, {'role': 'assistant', 'content': "['data_exploration', 'data_preprocessing']"}]