-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExperimenter_BenchmarkStage2.R
63 lines (59 loc) · 2.29 KB
/
Experimenter_BenchmarkStage2.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
51
52
53
54
55
56
57
58
59
60
61
62
63
#' MetaMetrics – Binary-Classification Performance-Metrics Benchmarking (Experimenter Stage-2)
#' 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, machine learning, performance metrics, meta-metrics
#' @title MetaMetrics – Binary-Classification Performance-Metrics Benchmarking (Experimenter Stage-2)
#' @date 25 February 2019
#' @version 1.0
#' @note version history
#' 1.0, 25 February 2019, The first version
#' @description Experiment the Stage-2 of the benchmark
source('Benchmark2_MathEvaluation.R')
plotGraph <- function(FUN, plot_to_file=FALSE, filepath=NULL, width=20, height=15, units='cm', res=300, file_type='png')
{
if (plot_to_file) {
if (file_type == 'png') {
png(filename=filepath, width=width, height=height, units=units, res=res)
}
else {
pdf(filename=filepath, width=width, height=height, units=units, res=res)
}
}
FUN()
if (plot_to_file) {
dev.off()
}
}
plotAndStoreGraphs <- function()
{
cat('Plotting metric-space density graphs...');
plotGraph(plotDescriptiveCriteria,
plot_to_file=TRUE,
filepath='../results/Stage2/Fig1_MetricSpaceDistribution.png')
cat(' [done]\n');
cat('Plotting metric-space ouput smoothness graphs...');
plotGraph(plotOuputSmothness,
plot_to_file=TRUE,
filepath='../results/Stage2/Fig2_MetricSpaceSmoothness.png')
cat(' [done]\n');
}