-
Notifications
You must be signed in to change notification settings - Fork 1
/
TasKarColors.R
50 lines (46 loc) · 2.24 KB
/
TasKarColors.R
1
2
3
4
5
6
7
8
9
10
11
12
13
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
#' MetaMetrics – Binary-Classification Performance-Metrics Benchmarking (Metric Colors)
#' Copyright (C) 2017-2019 Gürol Canbek
#' This file is licensed under
#'
#' GNU Affero General Public License v3.0, GNU AGPLv3
#'
#' This program is free software: you can redistribute it and/or modify
#' it under the terms of the GNU Affero General Public License as published
#' by the Free Software Foundation, either version 3 of the License, or
#' (at your option) any later version.
#'
#' This program is distributed in the hope that it will be useful,
#' but WITHOUT ANY WARRANTY; without even the implied warranty of
#' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#' GNU Affero General Public License for more details.
#'
#' You should have received a copy of the GNU Affero General Public License
#' along with this program. If not, see <https://www.gnu.org/licenses/>.
#'
#' See the license file in <https://github.com/gurol/metametrics>
#'
#' @author Gürol Canbek, <[email protected]>
#' @references <http://gurol.canbek.com>
#' @keywords binary classification, performance metrics, meta-metrics, time test
#' @title MetaMetrics – Binary-Classification Performance-Metrics Benchmarking (Metric Colors)
#' @date 25 February 2019
#' @version 1.0
#' @note version history
#' 1.0, 25 February 2019, The first version
#' @description Color palette for benchmarked metrics
library(RColorBrewer)
# For hexbin
hexbin.colors <- colorRampPalette(rev(brewer.pal(11, 'Spectral')))
# Color like jetcolors in MatLab
# See http://stackoverflow.com/questions/18360196/how-can-i-get-a-certain-colorful-scale-in-r
jet.colors <- colorRampPalette(c('#00007F', 'blue', '#007FFF', 'cyan',
'#7FFF7F', 'yellow', '#FF7F00', 'red',
'#7F0000'))
# Background colors Base (0), 1st level 2nd level
metric.bgcolors <- c('#FED96F', '#FEE59D', '#FFF1CE')
# Forecolors Base (0), 1st level 2nd level
metric.colors <- c('#974715', '#BD581A', '#E46A21')
# Background colors Base (0), 1st level 2nd level 3rd level
measure.bgcolors <- c('#A6A6A6', '#BFBFBF', '#D9D9D9', '#F2F2F2')
# Forecolors Base (0), 1st level 2nd level 3rd level
measure.colors <- c('#000000', '#000000', '#000000', '#000000')