new NNMLPVisualizer(config)
- Source:
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
Properties
|
Members
callbacks :Object
- Source:
Type:
- Object
container :HTMLElement
- Source:
Type:
- HTMLElement
lastSnapshot :Object|null
- Source:
Type:
- Object | null
svg :SVGSVGElement|null
- Source:
Type:
- SVGSVGElement | null
topology :Array.<number>
- Source:
Type:
- Array.<number>
viewport :SVGGElement|null
- Description:
Viewport group for zoom/pan
- Source:
Viewport group for zoom/pan
Type:
- SVGGElement | null
Methods
applyWeightFilter(percentage)
- Description:
Hides connections whose absolute weight falls below the given percentile. 100% = show all, 0% = hide all.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
percentage |
number | — 0–100 |
destroy()
- Description:
Destroys the visualizer and cleans up event listeners.
- Source:
highlightInputWeights(weights)
- Description:
Highlights input rects by weight magnitude (receptive field visualization).
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
weights |
Array.<number> | — 9 weights from a hidden neuron |
init(topology)
- Description:
Initialisiert das SVG für eine gegebene Topologie.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
topology |
Array.<number> | — z.B. [9, 36, 9] |
resetInputHighlight(grid)
- Description:
Resets input highlights back to board state.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
grid |
Array.<number> | — TTTRegularBoard.grid |
updateFromSnapshot(snapshot)
- Description:
Updates the visualization from a NeuralNetwork snapshot.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
snapshot |
NetworkSnapshot |
updateInputBoard(grid)
- Description:
Updates input rects from TTTRegularBoard.grid. grid values: CELL_EMPTY=0, PLAYER1=1, PLAYER2=2
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
grid |
Array.<number> | — 9 values from TTTRegularBoard.grid |
updateOutputHeatmap(predictions, grid)
- Description:
Updates output rects as a heatmap of NN predictions.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
predictions |
Float64Array | — Softmax output (9 values) |
grid |
Array.<number> | — Board grid to dim occupied cells |