You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: domains/anomaly-detection/explore/AnomalyDetectionIsolationForestExploration.ipynb
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,8 @@
36
36
"| `Normalized Cluster Distance` | Geometric | Relative to cluster radius | Adds context to position |\n",
37
37
"| `1.0 - HDBSCAN membership probability` | Cluster Confidence | How confidently HDBSCAN clustered this node, 1-x inverted | High score = likely anomaly |\n",
38
38
"| `Average Cluster Radius` | Cluster Context | How tight or spread out the cluster is | Highly spread clusters may be a less meaningful one |\n",
39
-
"| `Abstractness` (Robert C. Martin) | Design / OO Metric | Ratio of abstract types (interfaces, abstract classes) to total types | Indicates architectural intent; supports Dependency Inversion Principle and stability balance |\n"
39
+
"| `Abstractness` (Robert C. Martin) | Design / OO Metric | Ratio of abstract types (interfaces, abstract classes) to total types | Indicates architectural intent; supports Dependency Inversion Principle and stability balance |\n",
40
+
"| `Relative Strong Component Size (vs WCC Median)` | Structural / Graph Topology | Size of the node’s strongly connected component normalized by the median SCC size within its weakly connected component | Highlights unusually large cyclic dependency groups relative to local context; high values often indicate architectural tangles or stability issues |\n"
40
41
]
41
42
},
42
43
{
@@ -210,6 +211,8 @@
210
211
" ,coalesce(codeUnit.outgoingDependencies, 0) AS outgoingDependencies\n",
211
212
" ,coalesce(codeUnit.fqn, codeUnit.globalFqn, codeUnit.fileName, codeUnit.signature, codeUnit.name) AS codeUnitName\n",
212
213
" ,coalesce(artifactName, projectName, \"\") AS projectName\n",
214
+
" OPTIONAL MATCH (codeUnit)-[:IN_STRONGLY_CONNECTED_COMPONENT]->(stronglyConnectedComponent:StronglyConnectedComponent)\n",
215
+
" OPTIONAL MATCH (codeUnit)-[:IN_WEAKLY_CONNECTED_COMPONENT]->(weaklyConnectedComponent:WeaklyConnectedComponent)\n",
213
216
" RETURN DISTINCT \n",
214
217
" codeUnitName\n",
215
218
" ,codeUnit.name AS shortCodeUnitName\n",
@@ -232,6 +235,7 @@
232
235
" ,codeUnit.clusteringHDBSCANSize AS clusterSize\n",
233
236
" ,codeUnit.clusteringHDBSCANLabel AS clusterLabel\n",
234
237
" ,codeUnit.clusteringHDBSCANMedoid AS clusterMedoid\n",
238
+
" ,coalesce(stronglyConnectedComponent.size / weaklyConnectedComponent.stronglyConnectedComponentSizePercentile50, 1.0) AS stronglyConnectedComponentSizeRatio\n",
235
239
" ,codeUnit.embeddingsFastRandomProjectionTunedForClusteringVisualizationX AS embeddingVisualizationX\n",
236
240
" ,codeUnit.embeddingsFastRandomProjectionTunedForClusteringVisualizationY AS embeddingVisualizationY\n",
0 commit comments