RECODE-H / annotations /annotation_5 /function_info.json
mcy98's picture
Upload folder using huggingface_hub
22e9602 verified
Raw History Blame Contribute Delete
20.7 kB
[
{
"function_name": "__init__",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "isinstance",
"functionality": "Checks if an object is an instance of a class or of a type.",
"input": "object, classinfo",
"output": "bool",
"location_or_namespace": "builtins"
},
{
"function_call_name": "self._load_data_from_folder",
"functionality": "Load data from a folder containing individual pickle files.",
"input": "folder_path (str)",
"output": "list",
"location_or_namespace": "presto/atom.py"
},
{
"function_call_name": "TypeError",
"functionality": "Raised when an operation or function is applied to an object of inappropriate type.",
"input": "message (str)",
"output": "TypeError object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "len",
"functionality": "Return the length (the number of items) of an object.",
"input": "object",
"output": "int",
"location_or_namespace": "builtins"
}
]
},
{
"function_name": "MMS (setter)",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "isinstance",
"functionality": "Checks if an object is an instance of a class or of a type.",
"input": "object, classinfo",
"output": "bool",
"location_or_namespace": "builtins"
},
{
"function_call_name": "self._load_data",
"functionality": "Load the MMS matrix from a file.",
"input": "path (str)",
"output": "object (loaded data)",
"location_or_namespace": "presto/atom.py"
},
{
"function_call_name": "TypeError",
"functionality": "Raised when an operation or function is applied to an object of inappropriate type.",
"input": "message (str)",
"output": "TypeError object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "self.validate_distance_matrix",
"functionality": "Validate a distance matrix. The matrix must be symmetric, have zeros on the diagonal, and have the correct shape.",
"input": "M (numpy.ndarray), shape (tuple)",
"output": "M (numpy.ndarray)",
"location_or_namespace": "presto/atom.py"
}
]
},
{
"function_name": "compute_mms",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "NotImplementedError",
"functionality": "This exception is derived from RuntimeError. In user defined base classes, abstract methods should raise this exception when they require derived classes to override the method, or while the class is being developed to indicate that the real implementation still needs to be added.",
"input": "message (str)",
"output": "NotImplementedError object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "list",
"functionality": "Return a new list object.",
"input": "iterable (optional)",
"output": "list",
"location_or_namespace": "builtins"
},
{
"function_call_name": "range",
"functionality": "Rather than being a function, range is actually an immutable sequence type.",
"input": "stop (int) or start (int), stop (int), step (int, optional)",
"output": "range object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "itertools.combinations",
"functionality": "Return r length subsequences of elements from the input iterable.",
"input": "iterable, r (int)",
"output": "iterator",
"location_or_namespace": "itertools"
},
{
"function_call_name": "len",
"functionality": "Return the length (the number of items) of an object.",
"input": "object",
"output": "int",
"location_or_namespace": "builtins"
},
{
"function_call_name": "np.isnan",
"functionality": "Test element-wise for NaN and return result as a boolean array.",
"input": "x (array_like)",
"output": "ndarray or bool",
"location_or_namespace": "numpy"
},
{
"function_call_name": "Presto",
"functionality": "Initialize Presto object for topological analysis.",
"input": "projector (class), max_homology_dim (int), resolution (int)",
"output": "Presto object",
"location_or_namespace": "presto.presto"
},
{
"function_call_name": "presto_instance.fit_transform",
"functionality": "Computes the Presto distance/score between two datasets X and Y.",
"input": "X, Y, n_components (int), normalize (bool), n_projections (int), score_type (str), normalization_approx_iterations (int), seed (int)",
"output": "float (Presto score)",
"location_or_namespace": "presto.presto.Presto"
},
{
"function_call_name": "ThreadPoolExecutor",
"functionality": "An Executor subclass that uses a pool of at most max_workers threads to execute calls asynchronously.",
"input": "max_workers (int, optional), thread_name_prefix (str, optional), initializer (callable, optional), initargs (tuple, optional)",
"output": "ThreadPoolExecutor object",
"location_or_namespace": "concurrent.futures"
},
{
"function_call_name": "os.cpu_count",
"functionality": "Return the number of CPUs in the system. Returns None if undetermined.",
"input": "",
"output": "int or None",
"location_or_namespace": "os"
},
{
"function_call_name": "executor.map",
"functionality": "Applies a function to every item of iterable, yielding a sequence of results.",
"input": "func (callable), *iterables",
"output": "iterator",
"location_or_namespace": "concurrent.futures.ThreadPoolExecutor"
},
{
"function_call_name": "tqdm",
"functionality": "A fast, extensible progress bar for Python and CLI.",
"input": "iterable (optional), desc (str, optional), total (int or float, optional), leave (bool, optional), file (io.TextIOWrapper or io.StringIO, optional), ncols (int, optional), mininterval (float, optional), maxinterval (float, optional), miniters (int or float, optional), ascii (bool or str, optional), disable (bool, optional), unit (str, optional), unit_scale (bool or int or float, optional), dynamic_ncols (bool, optional), smoothing (float, optional), bar_format (str, optional), initial (int or float, optional), position (int, optional), postfix (dict, optional), unit_divisor (float, optional), write_bytes (bool, optional), lock_args (tuple, optional), nrows (int, optional), colour (str, optional), delay (float, optional), gui (bool, optional), **kwargs",
"output": "iterable",
"location_or_namespace": "tqdm"
},
{
"function_call_name": "map",
"functionality": "Return an iterator that applies function to every item of iterable, yielding the results.",
"input": "function, iterable, ...",
"output": "iterator",
"location_or_namespace": "builtins"
},
{
"function_call_name": "coo_array",
"functionality": "A sparse matrix in COOrdinate format.",
"input": "(data, (row, col)), shape (tuple, optional), dtype (dtype, optional), copy (bool, optional)",
"output": "coo_array object",
"location_or_namespace": "scipy.sparse"
},
{
"function_call_name": "mms_sparse.todense",
"functionality": "Return a dense matrix representation of this matrix.",
"input": "order (str, optional, {'C', 'F'}), out (ndarray, optional)",
"output": "numpy.matrix",
"location_or_namespace": "scipy.sparse.coo_array"
}
]
},
{
"function_name": "save_mms",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "open",
"functionality": "Open file and return a corresponding file object.",
"input": "file, mode (str, optional), buffering (int, optional), encoding (str, optional), errors (str, optional), newline (str, optional), closefd (bool, optional), opener (callable, optional)",
"output": "file object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "pickle.dump",
"functionality": "Write a pickled representation of obj to the open file object file.",
"input": "obj, file, protocol (int, optional), fix_imports (bool, optional), buffer_callback (callable, optional)",
"output": "None",
"location_or_namespace": "pickle"
}
]
},
{
"function_name": "cluster",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "self.compute_mms",
"functionality": "Compute a multiverse metric space (MMS) based on the `presto` score between embeddings.",
"input": "projector (class, optional), n_projections (int, optional), score_type (str, optional), n_components (int, optional), normalize (bool, optional), max_homology_dim (int, optional), resolution (int, optional), normalization_approx_iterations (int, optional), parallelize (bool, optional)",
"output": "None (sets self.MMS)",
"location_or_namespace": "presto/atom.py"
},
{
"function_call_name": "AgglomerativeClustering",
"functionality": "Agglomerative Clustering.",
"input": "n_clusters (int or None, optional), metric (str or callable, optional), memory (str or joblib.Memory, optional), connectivity (array-like or callable, optional), compute_full_tree (str or bool, optional), linkage (str, optional), distance_threshold (float, optional), compute_distances (bool, optional)",
"output": "AgglomerativeClustering object",
"location_or_namespace": "sklearn.cluster"
},
{
"function_call_name": "clustering_instance.fit",
"functionality": "Fit the agglomerative clustering from features or distance matrix.",
"input": "X (array-like of shape (n_samples, n_features) or (n_samples, n_samples)), y (Ignored)",
"output": "self (AgglomerativeClustering object)",
"location_or_namespace": "sklearn.cluster.AgglomerativeClustering"
}
]
},
{
"function_name": "compute_set_cover",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "self.compute_mms",
"functionality": "Compute a multiverse metric space (MMS) based on the `presto` score between embeddings.",
"input": "projector (class, optional), n_projections (int, optional), score_type (str, optional), n_components (int, optional), normalize (bool, optional), max_homology_dim (int, optional), resolution (int, optional), normalization_approx_iterations (int, optional), parallelize (bool, optional)",
"output": "None (sets self.MMS)",
"location_or_namespace": "presto/atom.py"
},
{
"function_call_name": "self._set_cover_graph",
"functionality": "Construct a bipartite graph for set-cover approximation.",
"input": "MMS (numpy.ndarray), epsilon (float)",
"output": "networkx.DiGraph",
"location_or_namespace": "presto/atom.py"
},
{
"function_call_name": "self._compute_set_cover",
"functionality": "Compute a set-cover approximation based on a greedy bipartite-graph heuristic.",
"input": "G_original (networkx.DiGraph)",
"output": "dict",
"location_or_namespace": "presto/atom.py"
}
]
},
{
"function_name": "_compute_set_cover",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "G_original.copy",
"functionality": "Return a copy of the graph.",
"input": "as_view (bool, optional)",
"output": "Graph object",
"location_or_namespace": "networkx.DiGraph"
},
{
"function_call_name": "G.nodes",
"functionality": "A NodeView of the Graph as G.nodes or G.nodes().",
"input": "data (bool or str, optional), default (any, optional)",
"output": "NodeView",
"location_or_namespace": "networkx.DiGraph"
},
{
"function_call_name": "max",
"functionality": "Return the largest item in an iterable or the largest of two or more arguments.",
"input": "iterable, *[, key, default] or arg1, arg2, *args[, key]",
"output": "any",
"location_or_namespace": "builtins"
},
{
"function_call_name": "G.out_degree",
"functionality": "Return the out-degree of a single node or out-degrees of several nodes.",
"input": "nbunch (single node or iterable, optional), weight (string or None, optional)",
"output": "int or DiDegreeView",
"location_or_namespace": "networkx.DiGraph"
},
{
"function_call_name": "sorted",
"functionality": "Return a new sorted list from the items in iterable.",
"input": "iterable, /, *, key=None, reverse=False",
"output": "list",
"location_or_namespace": "builtins"
},
{
"function_call_name": "G_original.successors",
"functionality": "Return an iterator over successor nodes of n.",
"input": "n (node)",
"output": "iterator",
"location_or_namespace": "networkx.DiGraph"
},
{
"function_call_name": "list",
"functionality": "Return a new list object.",
"input": "iterable (optional)",
"output": "list",
"location_or_namespace": "builtins"
},
{
"function_call_name": "G.remove_nodes_from",
"functionality": "Remove multiple nodes.",
"input": "nodes_for_removal (iterable)",
"output": "None",
"location_or_namespace": "networkx.DiGraph"
},
{
"function_call_name": "set",
"functionality": "Return a new set object, optionally with elements taken from iterable.",
"input": "iterable (optional)",
"output": "set",
"location_or_namespace": "builtins"
}
]
},
{
"function_name": "_set_cover_graph",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "nx.DiGraph",
"functionality": "Base class for directed graphs.",
"input": "incoming_graph_data (input graph, optional), **attr",
"output": "DiGraph object",
"location_or_namespace": "networkx"
},
{
"function_call_name": "G.add_nodes_from",
"functionality": "Add multiple nodes.",
"input": "nodes_for_adding (iterable of nodes), **attr",
"output": "None",
"location_or_namespace": "networkx.DiGraph"
},
{
"function_call_name": "range",
"functionality": "Rather than being a function, range is actually an immutable sequence type.",
"input": "stop (int) or start (int), stop (int), step (int, optional)",
"output": "range object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "np.argwhere",
"functionality": "Find the indices of array elements that are non-zero, grouped by element.",
"input": "a (array_like)",
"output": "ndarray",
"location_or_namespace": "numpy"
},
{
"function_call_name": "G.add_edges_from",
"functionality": "Add all the edges in ebunch.",
"input": "ebunch_to_add (container of edges), **attr",
"output": "None",
"location_or_namespace": "networkx.DiGraph"
}
]
},
{
"function_name": "_load_data_from_folder",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "glob.glob",
"functionality": "Return a possibly-empty list of path names that match pathname, which must be a string containing a path specification.",
"input": "pathname (str), *, root_dir (None or str), dir_fd (None or int), recursive (bool), include_hidden (bool)",
"output": "list",
"location_or_namespace": "glob"
},
{
"function_call_name": "os.path.join",
"functionality": "Join one or more path components intelligently.",
"input": "path, *paths",
"output": "str",
"location_or_namespace": "os.path"
},
{
"function_call_name": "files.sort",
"functionality": "Sort the list in ascending order and return None.",
"input": "*, key=None, reverse=False",
"output": "None",
"location_or_namespace": "list"
},
{
"function_call_name": "Atom.file_id_sorter",
"functionality": "Extract the integer ID from a file path. Helper function for sorting embedding files.",
"input": "file_name (str)",
"output": "int",
"location_or_namespace": "presto/atom.py"
},
{
"function_call_name": "Atom._load_data",
"functionality": "Load the MMS matrix from a file.",
"input": "path (str)",
"output": "object (loaded data)",
"location_or_namespace": "presto/atom.py"
},
{
"function_call_name": "data.append",
"functionality": "Append object to the end of the list.",
"input": "object",
"output": "None",
"location_or_namespace": "list"
}
]
},
{
"function_name": "_load_data",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "os.path.exists",
"functionality": "Return True if path refers to an existing path or an open file descriptor. Returns False for broken symbolic links.",
"input": "path",
"output": "bool",
"location_or_namespace": "os.path"
},
{
"function_call_name": "FileNotFoundError",
"functionality": "Raised when a file or directory is requested but doesn’t exist.",
"input": "message (str)",
"output": "FileNotFoundError object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "open",
"functionality": "Open file and return a corresponding file object.",
"input": "file, mode (str, optional), buffering (int, optional), encoding (str, optional), errors (str, optional), newline (str, optional), closefd (bool, optional), opener (callable, optional)",
"output": "file object",
"location_or_namespace": "builtins"
},
{
"function_call_name": "pickle.load",
"functionality": "Read a pickled object representation from the open file object file and return the reconstituted object hierarchy specified therein.",
"input": "file, *, fix_imports=True, encoding='ASCII', errors='strict', buffers=None",
"output": "object",
"location_or_namespace": "pickle"
}
]
},
{
"function_name": "validate_distance_matrix",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "is_valid_dm",
"functionality": "Return True if the given array is a valid distance matrix.",
"input": "D (array_like), tol (float, optional), throw (bool, optional), name (str, optional), return_ waarom (bool, optional)",
"output": "bool",
"location_or_namespace": "scipy.spatial.distance"
}
]
},
{
"function_name": "file_id_sorter",
"file_path": "presto/atom.py",
"function_calls": [
{
"function_call_name": "re.search",
"functionality": "Scan through string looking for the first location where the regular expression pattern produces a match, and return a corresponding match object.",
"input": "pattern, string, flags=0",
"output": "match object or None",
"location_or_namespace": "re"
},
{
"function_call_name": "int",
"functionality": "Return an integer object constructed from a number or string x, or return 0 if no arguments are given.",
"input": "x=0, base=10",
"output": "int",
"location_or_namespace": "builtins"
},
{
"function_call_name": "float",
"functionality": "Return a floating point number constructed from a number or string x.",
"input": "x=0.0, /",
"output": "float",
"location_or_namespace": "builtins"
}
]
}
]