Finding the consensus classification using anonymous functions (CC284)

  Рет қаралды 621

Riffomonas Project

Riffomonas Project

Күн бұрын

Пікірлер: 6
@caesar6128
@caesar6128 3 ай бұрын
I hope this does not come as pedantic. A small suggestion is to replace "1:length(xxx)" with seq_along(xxx) or seq_len(length(xxx)) in loops and lapply functions. This is recommended mainly for edge cases where the input is an empty object, i.e, length is 0: > for (i in 1:0) print(i) [1] 1 [1] 0 > for (i in seq_len(0)) print(i) #nothing is printed > for (i in seq_along(NULL)) print(i) #nothing is printed > for (i in seq_along(c())) print(i) #nothing is printed > for (i in seq_along(list())) print(i) #nothing is printed
@Riffomonas
@Riffomonas 3 ай бұрын
Thanks - yeah I know I'm bad at this :) Hope to address in a future episode
@user-sb9oc3bm7u
@user-sb9oc3bm7u 3 ай бұрын
Hey Pat. as always, great vid. I am wondering, why using apply if we already saw in previous vids that a for loop might be faster? I tested some dummy code and found that for loop is indeed faster, and with the added benefit of readability (i think its a bit more clear than map/apply), would not hesitate to using it. # my code: library(stringi) library(purrr) library(microbenchmark) set.seed(123) myipsum
@user-sb9oc3bm7u
@user-sb9oc3bm7u 3 ай бұрын
Another thought? instead of removing, why not leaving the confidence and let user decide what to do with it? Other though (which you probably implemented already) is to allow a "threshold" attribute where the user can adjust the threshold-confidence for each use-case.
@Riffomonas
@Riffomonas 3 ай бұрын
Thanks! I may come back and refactor this part of the code, but it's pretty low intensity data processing compared to the other steps. It was easier to code in this instance. Speed isn't always the most important factor
@Riffomonas
@Riffomonas 3 ай бұрын
I think I did that, right? The output of classifying is the plurality consensus. Only on filtering and printing would the low confidence scores get dropped
At the end of the video, deadpool did this #harleyquinn #deadpool3 #wolverin #shorts
00:15
Anastasyia Prichinina. Actress. Cosplayer.
Рет қаралды 17 МЛН
Cute
00:16
Oyuncak Avı
Рет қаралды 6 МЛН
GTA 5 vs GTA San Andreas Doctors🥼🚑
00:57
Xzit Thamer
Рет қаралды 28 МЛН
Using R's profvis package to diagnose and resolve bottlenecks (CC286)
23:26
2020 Seminar Series: Slurm
29:05
BYUSupercomputing
Рет қаралды 11 М.
Writing an R function to read FASTA-formatted files (CC289)
41:37
Riffomonas Project
Рет қаралды 679
40 Years Of Software Engineering Experience In 19 Minutes
19:10
Continuous Delivery
Рет қаралды 55 М.
Incorporating C++ code in an R package with Rcpp and devtools (CC288)
26:30
TDD Is A BROKEN Practice
17:14
Continuous Delivery
Рет қаралды 30 М.
Benchmarking methods for reading text files in R (CC290)
33:58
Riffomonas Project
Рет қаралды 387
At the end of the video, deadpool did this #harleyquinn #deadpool3 #wolverin #shorts
00:15
Anastasyia Prichinina. Actress. Cosplayer.
Рет қаралды 17 МЛН