-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
94 lines (71 loc) · 2.53 KB
/
README.Rmd
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```
# parscanlogreader <img src="man/figures/logo.png" align="right" width="120"/>
<!-- badges: start -->
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/parscanlogreader)](https://cran.r-project.org/package=parscanlogreader)
[![pkgdown Workflow Status](https://github.com/kreh-team/parscanlogreader/workflows/pkgdown/badge.svg)](https://kreh-team.github.io/parscanlogreader/)
<!-- badges: end -->
## Overview
The goal of parscanlogreader is to read and process raw log files from Scikit-learn's [RandomizedSearchCV](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.RandomizedSearchCV.html).
## Installation
<!-- You can install the released version of parscanlogreader from [CRAN](https://CRAN.R-project.org) with: -->
<!-- ``` r -->
<!-- install.packages("parscanlogreader") -->
<!-- ``` -->
<!-- And -->
The development version can be installed from [GitHub](https://github.com/) with:
``` r
devtools::install_github("kreh-team/parscanlogreader")
```
## Examples
### Basic example
This is a basic example which shows you how the data pipeline works:
```r
library(parscanlogreader)
src_file <- "logs/cnn-gru-scan.log"
```
```r
log_data_raw <- src_file %>%
read_raw_log() %>%
clean_log_data()
log_data <- log_data_raw %>%
summarise_log_data()
```
Note that the functions are able to automatically parse the parameters `params_list`, `numeric_params`, `num_folds`, and `num_models` from the raw log files.
### Manual parameter settings
If you want, you can manually set them yourself, as shown in the example below:
```r
src_params_list <- c(
"optimizers", "opt_recurrent_regs", "opt_kernel_regs", "opt_go_backwards",
"opt_dropout_recurrent", "opt_dropout", "maxpool_size", "kernel_size",
"gru_hidden_units", "filter_conv", "epochs", "batch_size", "activation_conv"
)
src_numeric_params <- c(
"opt_dropout_recurrent", "opt_dropout", "maxpool_size", "kernel_size",
"gru_hidden_units", "filter_conv", "epochs", "batch_size"
)
```
```r
log_data_raw <- src_file %>%
read_raw_log(
params_list = src_params_list,
numeric_params = src_numeric_params
) %>%
clean_log_data()
log_data <- log_data_raw %>%
tidyr::drop_na() %>%
summarise_log_data(
params_list = src_params_list,
num_folds = 5,
num_models = 50
)
```