Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiments #17

Merged
merged 16 commits into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix param tables
  • Loading branch information
FrankBornais committed Jan 10, 2022
commit a862156e6653af688bb81daa0d67d9ce8b3ce318
1 change: 1 addition & 0 deletions R/calc_DD.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ calc_DD_m <- function(tm, k, a, b, t0, beta, c){

# replace NA and negative values
DD_m[which(is.na(DD_m)|DD_m < 0)] <- 0

DD_m

}
Expand Down
8 changes: 4 additions & 4 deletions R/calc_NFFD.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
#'
calc_NFFD <- function(m, tm) {

match_lines <- match(m, param$nffd$Month)
match_lines <- match(m, param$NFFD$Month)

a <- param$nffd$a[match_lines]
b <- param$nffd$b[match_lines]
t0 <- param$nffd$T0[match_lines]
a <- param$NFFD$a[match_lines]
b <- param$NFFD$b[match_lines]
t0 <- param$NFFD$T0[match_lines]

a/(1 + exp(-(tm - t0)/b))
}
6 changes: 3 additions & 3 deletions R/calc_PAS.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#'
calc_PAS <- function(m, tm) {

match_lines <- match(m, param$pas$Month)
match_lines <- match(m, param$PAS$Month)

b <- param$pas$b[match_lines]
t0 <- param$pas$T0[match_lines]
b <- param$PAS$b[match_lines]
t0 <- param$PAS$T0[match_lines]

1/(1 + exp(-(tm - t0)/b))
}