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
-[`vis.dual_axis_lines`](#visdual_axis_lines) : double y axis line plots
301
303
-[`vis.graph`](#visgraph) : network graphs
302
304
@@ -578,6 +580,32 @@ The following `opts` are supported:
578
580
-`opts.layoutopts` : `dict` of any additional options that the graph backend accepts for a layout. For example `layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}`.
579
581
-`opts.nancolor` : color for plotting `NaN`s. If this is `None`, `NaN`s will be plotted as transparent. (`string`; default = `None`)
580
582
583
+
#### vis.confusion_matrix
584
+
This function draws a confusion matrix for classification evaluation.
585
+
586
+
It accepts either:
587
+
- raw label vectors via `y_true` and `y_pred`, or
588
+
- a precomputed confusion matrix via `cm`.
589
+
590
+
Optional normalization can be applied with the `normalize` parameter:
591
+
-`'true'`: normalize by row (actual class)
592
+
-`'pred'`: normalize by column (predicted class)
593
+
-`'all'`: normalize by total count
594
+
595
+
An existing confusion matrix window can be modified with the `update` parameter:
596
+
-`'replace'`: redraw the whole matrix in the window given by `win`
597
+
-`'remove'`: delete the window given by `win`
598
+
599
+
The following `opts` are supported:
600
+
601
+
-`opts.title` : plot title (`string`; default = `Confusion Matrix`)
-`opts.showCounts` : show raw counts in cells (`bool`; default = `True`)
606
+
-`opts.showPercent` : show percentages in cells (`bool`; default = `True` when normalized, `False` otherwise)
607
+
-`opts.layoutopts` : `dict` of any additional options that the graph backend accepts for a layout.
608
+
581
609
#### vis.bar
582
610
This function draws a regular, stacked, or grouped bar plot. It takes as
583
611
input an `N` or `NxM` tensor `X` that specifies the height of each of the
@@ -696,6 +724,27 @@ The following `opts` are supported:
696
724
-`opts.opacity`: opacity of polygons (`number` between 0 and 1)
697
725
-`opts.layoutopts` : `dict` of any additional options that the graph backend accepts for a layout. For example `layoutopts = {'plotly': {'legend': {'x':0, 'y':0}}}`.
698
726
727
+
#### vis.sankey
728
+
This function draws a Sankey (flow) diagram. Flows are defined by three
729
+
equal-length arrays:
730
+
731
+
-`source`: source node index of each link (`N` array of ints)
732
+
-`target`: target node index of each link (`N` array of ints)
733
+
-`value` : magnitude of each link (`N` array of non-negative numbers)
734
+
735
+
`labels` is an optional list of node names. If omitted, nodes are referenced
736
+
by their index alone.
737
+
738
+
The following `opts` are supported:
739
+
740
+
-`opts.labels` : list of node labels (alternative to the `labels` arg)
741
+
-`opts.pad` : node padding in px (`number`; default = 15)
742
+
-`opts.thickness` : node thickness in px (`number`; default = 20)
743
+
-`opts.orientation`: `'h'` (default) or `'v'`
744
+
-`opts.nodecolor` : node color(s) (`string` or list of strings)
745
+
-`opts.linkcolor` : link color(s) (`string` or list of strings)
746
+
-`opts.layoutopts` : `dict` of any additional options that the graph backend accepts for a layout.
747
+
699
748
#### vis.dual_axis_lines
700
749
This function will create a line plot using plotly with different Y-Axis.
0 commit comments