File size: 12,668 Bytes
e89a301 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | [
{
"function_name": "get_all_rankings",
"file_path": "current_file.py",
"function_calls": [
{
"function_call_name": "isinstance",
"functionality": "Checks if an object is an instance of a specified class or a tuple of classes.",
"input": "path (object), pd.DataFrame (class or tuple of classes)",
"output": "bool",
"location_or_namespace": "builtins"
},
{
"function_call_name": "shape",
"functionality": "Returns a tuple representing the dimensions of the DataFrame. The [0] accesses the number of rows.",
"input": "path (pandas DataFrame)",
"output": "tuple (then int)",
"location_or_namespace": "pandas"
},
{
"function_call_name": "read_df",
"functionality": "Reads data from a pandas DataFrame and prepares it for ranking generation.",
"input": "dataframe (pandas.DataFrame), columns (list[str])",
"output": "",
"location_or_namespace": "ranking_util/basestuff.py"
},
{
"function_call_name": "read_csv",
"functionality": "Reads a comma-separated values (CSV) file into a pandas DataFrame.",
"input": "path (str)",
"output": "pandas.DataFrame",
"location_or_namespace": "pandas"
},
{
"function_call_name": "read_file",
"functionality": "Reads data from a CSV file and prepares it for ranking generation.",
"input": "file (str), columns (list[str])",
"output": "",
"location_or_namespace": "ranking_util/basestuff.py"
},
{
"function_call_name": "initialize",
"functionality": "Initializes the TwoD utility for generating rankings, managing the generation of permutations corresponding to projections on different vectors.",
"input": "None",
"output": "None",
"location_or_namespace": "ranking_util/TwoD.py"
},
{
"function_call_name": "range",
"functionality": "Generates an immutable sequence of numbers, commonly used for looping a specific number of times.",
"input": "start (int), stop (int)",
"output": "range object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "GetNext",
"functionality": "Returns the next ranking (r_), a swap index (j) that transformed the current ranking, and a theta value.",
"input": "None",
"output": "tuple (list[int], int, float)",
"location_or_namespace": "ranking_util/TwoD.py"
},
{
"function_call_name": "deepcopy",
"functionality": "Creates a new compound object (list) recursively copying its contents, ensuring that changes to the copy do not affect the original.",
"input": "r_ (list)",
"output": "list",
"location_or_namespace": "copy"
},
{
"function_call_name": "append",
"functionality": "Adds an item to the end of a list.",
"input": "item (any type)",
"output": "None",
"location_or_namespace": "builtins"
},
{
"function_call_name": "print",
"functionality": "Prints the specified objects to the standard output.",
"input": "count (int), len(R) (int)",
"output": "None (prints to stdout)",
"location_or_namespace": "builtins"
},
{
"function_call_name": "len",
"functionality": "Returns the number of items in an object.",
"input": "iterable (list)",
"output": "int",
"location_or_namespace": "builtins"
}
]
},
{
"function_name": "find_fair_ranking",
"file_path": "current_file.py",
"function_calls": [
{
"function_call_name": "isinstance",
"functionality": "Checks if an object is an instance of a specified class or a tuple of classes.",
"input": "path (object), pd.DataFrame (class or tuple of classes)",
"output": "bool",
"location_or_namespace": "builtins"
},
{
"function_call_name": "values",
"functionality": "Returns a NumPy representation of the given Series or Index.",
"input": "path[sens_attr_col] (pandas Series)",
"output": "numpy",
"location_or_namespace": "pandas"
},
{
"function_call_name": "list",
"functionality": "Returns a new list initialized from the elements of an iterable.",
"input": "iterable",
"output": "list",
"location_or_namespace": "builtins"
},
{
"function_call_name": "read_csv",
"functionality": "Reads a comma-separated values (CSV) file into a pandas DataFrame.",
"input": "path (str)",
"output": "pandas.DataFrame",
"location_or_namespace": "pandas"
},
{
"function_call_name": "Counter",
"functionality": "A dict subclass for counting hashable objects.",
"input": "G (list)",
"output": "collections.Counter object",
"location_or_namespace": "collections"
},
{
"function_call_name": "min",
"functionality": "Returns the smallest item in an iterable or the smallest of two or more arguments. Used here with a key function to find the key with the minimum value.",
"input": "iterable (Counter object), key (function)",
"output": "object (key with minimum value)",
"location_or_namespace": "builtins"
},
{
"function_call_name": "len",
"functionality": "Returns the number of items in an object.",
"input": "iterable (list)",
"output": "int",
"location_or_namespace": "builtins"
},
{
"function_call_name": "default_timer",
"functionality": "Returns the value (in fractional seconds) of a performance counter, providing a high-resolution time source.",
"input": "None",
"output": "float",
"location_or_namespace": "timeit"
},
{
"function_call_name": "get_all_rankings",
"functionality": "Generates a set of rankings (permutations of data item indices) and associated data, used as candidates for fair ranking evaluation.",
"input": "path (str or pandas.DataFrame), columns (list[str]), G (list), number_of_buckets (int)",
"output": "R (list[list[int]]), Theta (list[float]), swap_index (list[int])",
"location_or_namespace": "current_file.py"
},
{
"function_call_name": "unique",
"functionality": "Finds the unique elements of an array.",
"input": "G (list)",
"output": "numpy.ndarray",
"location_or_namespace": "numpy"
},
{
"function_call_name": "tolist",
"functionality": "Returns the array as a (possibly nested) list.",
"input": "numpy.ndarray",
"output": "list",
"location_or_namespace": "numpy"
},
{
"function_call_name": "enumerate",
"functionality": "Returns an enumerate object, which yields pairs containing a count (from start, which defaults to 0) and a value obtained from iterating over an iterable.",
"input": "iterable",
"output": "enumerate object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "defaultdict",
"functionality": "A dictionary subclass that calls a factory function to supply missing values for requested keys.",
"input": "list (factory function)",
"output": "collections.defaultdict object",
"location_or_namespace": "collections"
},
{
"function_call_name": "range",
"functionality": "Generates an immutable sequence of numbers, commonly used for looping a specific number of times.",
"input": "stop (int) or start (int), stop (int)",
"output": "range object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "count",
"functionality": "Returns the number of times a specified value occurs in a list.",
"input": "key (any type)",
"output": "int",
"location_or_namespace": "builtins"
},
{
"function_call_name": "comb",
"functionality": "Calculates the number of combinations (n choose k) without repetition.",
"input": "n (int), k (int)",
"output": "float",
"location_or_namespace": "scipy.special"
},
{
"function_call_name": "append",
"functionality": "Adds an item to the end of a list.",
"input": "item (any type)",
"output": "None",
"location_or_namespace": "builtins"
},
{
"function_call_name": "print",
"functionality": "Prints the specified objects to the standard output.",
"input": "count (int), len(R) (int)",
"output": "None (prints to stdout)",
"location_or_namespace": "builtins"
},
{
"function_call_name": "max",
"functionality": "Returns the maximum of an array or maximum along an axis.",
"input": "array_like (list of probabilities)",
"output": "float",
"location_or_namespace": "numpy"
},
{
"function_call_name": "min",
"functionality": "Returns the minimum of an array or minimum along an axis. In this context, used as a NumPy function.",
"input": "array_like (list of probabilities)",
"output": "float",
"location_or_namespace": "numpy"
},
{
"function_call_name": "index",
"functionality": "Returns the index of the first occurrence of a value in the list.",
"input": "value (float)",
"output": "int",
"location_or_namespace": "builtins"
}
]
},
{
"function_name": "query",
"file_path": "current_file.py",
"function_calls": [
{
"function_call_name": "range",
"functionality": "Generates an immutable sequence of numbers, commonly used for looping a specific number of times.",
"input": "stop (int)",
"output": "range object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "bisect",
"functionality": "Returns an insertion point for item x in list a to maintain sorted order, where x comes before (to the left of) any existing entries of x.",
"input": "a (list), x (float)",
"output": "int",
"location_or_namespace": "bisect"
},
{
"function_call_name": "len",
"functionality": "Returns the number of items in an object.",
"input": "iterable (list)",
"output": "int",
"location_or_namespace": "builtins"
}
]
}
] |