Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions docs/api/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ unweighted graph construction, not a weighted adaptive kernel; use
show_root_heading: true
show_root_toc_entry: true

::: topo.tpgraph.kernels.compute_kernel
options:
heading_level: 3
show_root_heading: true
show_root_toc_entry: true

::: topo.tpgraph.kernels.Kernel
options:
heading_level: 3
Expand All @@ -55,6 +61,30 @@ unweighted graph construction, not a weighted adaptive kernel; use
- "!^__"
- "!^_"

::: topo.spectral.eigen.eigendecompose
options:
heading_level: 3
show_root_heading: true
show_root_toc_entry: true

::: topo.spectral.LE
options:
heading_level: 3
show_root_heading: true
show_root_toc_entry: true

::: topo.spectral.graph_laplacian
options:
heading_level: 3
show_root_heading: true
show_root_toc_entry: true

::: topo.spectral.diffusion_operator
options:
heading_level: 3
show_root_heading: true
show_root_toc_entry: true

::: topo.layouts.projector.Projector
options:
heading_level: 3
Expand All @@ -74,3 +104,21 @@ unweighted graph construction, not a weighted adaptive kernel; use
filters:
- "!^__"
- "!^_"

::: topo.tpgraph.intrinsic_dim.automated_scaffold_sizing
options:
heading_level: 3
show_root_heading: true
show_root_toc_entry: true

::: topo.layouts.diagnostics.find_ideal_projection
options:
heading_level: 3
show_root_heading: true
show_root_toc_entry: true

::: topo.layouts.diagnostics.run_best_projection
options:
heading_level: 3
show_root_heading: true
show_root_toc_entry: true
10 changes: 0 additions & 10 deletions main.py

This file was deleted.

15 changes: 9 additions & 6 deletions notebooks/_example_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
topo_preserve_score,
)
from topo.layouts.projector import Projector
from topo.spectral.eigen import EigenDecomposition, spectral_layout
from topo.spectral import LE
from topo.spectral.eigen import EigenDecomposition
from topo.topograph import _KERNEL_CONFIGS
from topo.tpgraph.kernels import Kernel

Expand Down Expand Up @@ -307,7 +308,7 @@ def graph_layout_array(value: Any, n_samples: int) -> FloatArray:
value = value[0]
return checked_embedding(
value,
"spectral_layout()",
"LE()",
n_samples=n_samples,
min_columns=2,
)
Expand Down Expand Up @@ -357,7 +358,6 @@ def run_pipeline(data: DemoData, config: DemoConfig) -> PipelineResult:
method=config.dm_method,
eigensolver=config.eigensolver,
drop_first=True,
weight=True,
t=config.diffusion_time,
)
eigen.fit(kernel_X)
Expand Down Expand Up @@ -387,9 +387,12 @@ def run_pipeline(data: DemoData, config: DemoConfig) -> PipelineResult:
K_Z = as_csr_matrix(kernel_Z.K, "kernel_Z.K")
L_Z = as_csr_matrix(kernel_Z.L, "kernel_Z.L")

init_raw = spectral_layout(
graph=K_Z,
dim=config.n_components_2d,
init_raw = LE(
K_Z,
n_eigs=config.n_components_2d,
laplacian_type="normalized",
drop_first=True,
return_evals=False,
random_state=config.random_state,
)
init_Y = graph_layout_array(init_raw, n_samples=X.shape[0])
Expand Down
2 changes: 2 additions & 0 deletions notebooks/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"source": [
"# # TopOMetry demo\n",
"#\n",
"# **Purpose:** a compact first-run path through the full TopOMetry workflow.\n",
"#\n",
"# This notebook gives a compact tour of the TopOMetry workflow:\n",
"#\n",
"# 1. load or generate data;\n",
Expand Down
Loading
Loading