multipers.data package
Submodules
multipers.data.MOL2 module
multipers.data.UCR module
- multipers.data.UCR.get(dataset='UCR/Coffee', test=False, DATASET_PATH='/user/dloiseau/home/Datasets/', dim=3, delay=1, skip=1)
- Parameters:
dataset (str)
test (bool)
DATASET_PATH (str)
- multipers.data.UCR.get_test(*args, **kwargs)
- multipers.data.UCR.get_train(*args, **kwargs)
multipers.data.graphs module
- class multipers.data.graphs.Graph2SimplexTrees(filtrations=[], delayed=False, num_collapses=100, progress=False)
Bases:
BaseEstimator
,TransformerMixin
Transforms a list of networkx graphs into a list of simplextree multi
Usual Filtrations
“cc” closeness centrality
“geodesic” if the graph provides data to compute it, e.g., BZR, COX2, PROTEINS
“degree”
“ricciCurvature” the ricci curvature
“fiedler” the square of the fiedler vector
- _sklearn_auto_wrap_output_keys = {'transform'}
- fit(X, y=None)
- transform(X)
- Parameters:
X (list[Graph])
- Parameters:
progress (bool)
- multipers.data.graphs._check_installed(dataset)
- Parameters:
dataset (str)
- multipers.data.graphs.compute_cc(graphs, progress=1)
- Parameters:
graphs (list[Graph])
- multipers.data.graphs.compute_degree(graphs, progress=1)
- Parameters:
graphs (list[Graph])
- multipers.data.graphs.compute_fiedler(graphs, progress=1)
- Parameters:
graphs (list[Graph])
- multipers.data.graphs.compute_filtration(dataset, filtration='ALL', **kwargs)
- Parameters:
dataset (str)
filtration (str)
- multipers.data.graphs.compute_geodesic(graphs, progress=1)
- Parameters:
graphs (list[Graph])
- multipers.data.graphs.compute_hks(graphs, t, progress=1)
- Parameters:
graphs (list[Graph])
t (float)
- multipers.data.graphs.compute_intrinsic(graphs, progress=1, nowarning=False)
- Parameters:
graphs (list[Graph])
- multipers.data.graphs.compute_ricci(graphs, alpha=0.5, progress=1)
- Parameters:
graphs (list[Graph])
- multipers.data.graphs.get(dataset, filtration=None)
- Parameters:
dataset (str)
filtration (str | None)
- multipers.data.graphs.get_from_file(dataset)
- Parameters:
dataset (str)
- multipers.data.graphs.get_from_file_old(dataset, label='lb')
- Parameters:
dataset (str)
- multipers.data.graphs.get_graphs(dataset, N='')
- Parameters:
dataset (str)
N (int | str)
- Return type:
tuple[list[Graph], list[int]]
- multipers.data.graphs.reset_graphs(dataset, N=None)
- Parameters:
dataset (str)
- multipers.data.graphs.set_graphs(graphs, labels, dataset, N='')
- Parameters:
graphs (list[Graph])
labels (list)
dataset (str)
N (int | str)
multipers.data.immuno_regions module
- multipers.data.immuno_regions.get(DATASET_PATH='/user/dloiseau/home/Datasets/')
- multipers.data.immuno_regions.get_immuno(i=1, DATASET_PATH='/user/dloiseau/home/Datasets/')
multipers.data.minimal_presentation_to_st_bf module
multipers.data.pytorch2simplextree module
- class multipers.data.pytorch2simplextree.Torch2SimplexTree(filtrations=[])
Bases:
BaseEstimator
,TransformerMixin
WARNING : build in progress PyTorch Data-like to simplextree.
Input
Class having pos, edges, faces methods
Filtrations
Geodesic (geodesic rips)
eccentricity
- _sklearn_auto_wrap_output_keys = {'transform'}
- fit(X, y=None)
- mp = <module 'multipers' from '/home/dloiseau/micromamba/envs/312/lib/python3.12/site-packages/multipers/__init__.py'>
- transform(X)
- Parameters:
X (list[Graph])
- Parameters:
filtrations (Iterable[str])
- multipers.data.pytorch2simplextree.modelnet2graphs(version='10', print_flag=False, labels_only=False, a=0, b=10, weight_flag=False)
load modelnet 10 or 40 and convert to graphs
- multipers.data.pytorch2simplextree.modelnet2pts2gs(train_dataset, test_dataset, nbr_size=8, exp_flag=True, labels_only=False, n=100, n_jobs=1, random=False)
- multipers.data.pytorch2simplextree.torch_geometric_2nx(dataset, labels_only=False, print_flag=False, weight_flag=False)
- Parameters:
dataset
labels_only – return labels only
print_flag
weight_flag – whether computing distance as weights or not
- Returns:
multipers.data.shape3d module
- multipers.data.shape3d.get(dataset, num_graph=0, seed=0, node_per_graph=0)
- Parameters:
dataset (str)
- multipers.data.shape3d.get_(dataset, dataset_num=None, num_sample=0, DATASET_PATH='/user/dloiseau/home/Datasets/')
- Parameters:
dataset (str)
dataset_num (int | None)
num_sample (int)
- multipers.data.shape3d.get_ModelNet(dataset, num_graph, seed)
- multipers.data.shape3d.load_modelnet(version='10', sample_points=False, reset=False, remove_faces=False)
- Parameters:
reset (bool)
multipers.data.synthetic module
- multipers.data.synthetic.get_orbit5k(num_pts=1000, num_data=5000)
- multipers.data.synthetic.noisy_annulus(n1=1000, n2=200, r1=1, r2=2, dim=2, center=None, **kwargs)
Generates a noisy annulus dataset.
Parameters
- r1float.
Lower radius of the annulus.
- r2float.
Upper radius of the annulus.
- n1int
Number of points in the annulus.
- n2int
Number of points in the square.
- dimint
Dimension of the annulus.
- center: list or array
center of the annulus.
Returns
- numpy array
Dataset. size : (n1+n2) x dim
- Parameters:
n1 (int)
n2 (int)
r1 (float)
r2 (float)
dim (int)
center (ndarray | list | None)
- Return type:
ndarray
- multipers.data.synthetic.orbit(n=1000, r=1.0, x0=[])
- Parameters:
n (int)
r (float)
- multipers.data.synthetic.three_annulus(num_pts=500, num_outliers=500)
- Parameters:
num_pts (int)
num_outliers (int)