Coupure prévue mardi 3 Août au matin pour maintenance du serveur. Nous faisons au mieux pour que celle-ci soit la plus brève possible.

subgroup_bar_visualization.html 2.52 KB
Newer Older
1
2
3
4
5
6
7
8
9
<div id="widgetvisualization-{{widget.pk}}" rel="{{widget.pk}}" class="widgetvisualizationdialog" title="{{widget.name}} visualization" width="700px" height="670px">
    <div style="width:620px; margin: 0 auto;">
        <form>
        <div id="bar_chart{{widget.pk}}" style="margin-bottom: 10px;">
        </div>
        <input type="hidden" name="widget_id" value="{{widget.pk}}"/>
        </form>
        <script type="text/javascript">
        $(function () {
Anze Vavpetic's avatar
Anze Vavpetic committed
10

11
12
13
            $(document).ready(function(){ 
                plot();
            });
Anze Vavpetic's avatar
Anze Vavpetic committed
14

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
            // Plots for the selected attribute.
            function plot() {
                // Weights barchart
                new Highcharts.Chart({
                    chart: {
                        renderTo: 'bar_chart{{widget.pk}}',
                        type: 'bar'
                    },
                    title: {
                        text: 'Subgroup BAR visualization'
                    },
                    subtitle: {
                        text: 'Model: {{ model_name }}'
                    },
                    xAxis: [{
                        categories: {{subgroups|safe}},
                        reversed: false
                    }],
                    yAxis: {
                        title: {
                            text: null
                        },
                        labels: {
                            formatter: function(){
                                return Math.abs(this.value);
                            }
                        },
                        min: -1.0,
                        max: 1.0
                    },
                    plotOptions: {
                        series: {
                            stacking: 'normal'
                        }
                    },
                    tooltip: {
                        formatter: function() {
                            return ''+
                                this.series.name +': '+ Math.abs(this.y.toFixed(3));
                        }
                    },
                    series: [{
                        name: 'False positive rate',
                        data: {{fpr|safe}}
                    }, {
                        name: 'True positive rate',
                        data: {{tpr|safe}}
                    }],
                    credits: {
                        enabled: false
                    }
                });
            }
        });
        </script>
    </div>
</div>