Skip to content

Commit 53f1d23

Browse files
authored
Merge branch 'main' into Merging_ML_results
2 parents 7bf2eae + cff9efa commit 53f1d23

59 files changed

Lines changed: 3308 additions & 1369 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
^cran-comments\.md$
66
^\.github$
77
^CODE_OF_CONDUCT\.md$
8+
^doc$
9+
^Meta$

DESCRIPTION

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Description: Comprehensive machine learning (ML) pipeline for predicting antimic
1515
(MDR) and cross-resistance predictions with multiple holdout strategies
1616
(geographic, temporal, species). Includes model evaluation, feature importance
1717
analysis, cross-scale performance comparison, and functional characterization
18-
of top features. Designed to work with data from amR_data package and generate
19-
results for amR_shiny visualization. Can work independently with example
18+
of top features. Designed to work with data from amRdata package and generate
19+
results for amRshiny visualization. Can work independently with example
2020
ESKAPE pathogen datasets, too.
2121
License: BSD_3_clause + file LICENSE
2222
Encoding: UTF-8
@@ -37,7 +37,11 @@ Imports:
3737
DBI,
3838
dplyr,
3939
duckdb,
40+
future,
41+
future.apply,
4042
ggplot2,
43+
ggrepel,
44+
glmnet,
4145
glue,
4246
hardhat,
4347
parsnip,
@@ -61,5 +65,5 @@ biocViews:
6165
MicrobialGenomics,
6266
Pathogen,
6367
Visualization
64-
URL: https://github.com/JRaviLab/amR_ml
65-
BugReports: https://github.com/JRaviLab/amR_ml/issues
68+
URL: https://github.com/JRaviLab/amRml
69+
BugReports: https://github.com/JRaviLab/amRml/issues

Meta/vignette.rds

208 Bytes
Binary file not shown.

NAMESPACE

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
11
# Generated by roxygen2: do not edit by hand
22

3+
export(.getTargetVarName)
34
export(applyBenjaminiHochberg)
45
export(buildLRModel)
56
export(buildRecipe)
67
export(buildTuningGrid)
78
export(buildWflow)
8-
export(calculateAUPRC)
9-
export(calculateBalAcc)
109
export(calculateEvalMets)
11-
export(calculateF1)
12-
export(calculateLog2APOP)
1310
export(calculateMinSamples)
14-
export(calculateSensitivity)
15-
export(calculateSpecificity)
16-
export(calculatenMCC)
1711
export(computeFeatureFreq)
12+
export(createMLResultDir)
13+
export(createMLinputList)
1814
export(encodePhenotype)
1915
export(extractTopFeats)
2016
export(fitBestModel)
2117
export(generateMLInputs)
22-
export(getBaselineComparisonBarplot)
2318
export(getConfusionMatrix)
24-
export(getFitHps)
2519
export(getNumFeat)
26-
export(getTargetVarName)
2720
export(loadMLInputTibble)
21+
export(plotBaselineComparison)
2822
export(plotDefaultEval)
23+
export(plotFishers)
2924
export(plotPRC)
3025
export(plotTopFeatsVI)
31-
export(predict)
26+
export(predictML)
3227
export(removeTopFeats)
3328
export(runFisherTests)
3429
export(runFishers)
3530
export(runIFE)
31+
export(runMDRmodels)
3632
export(runMLPipeline)
33+
export(runMLmodels)
34+
export(runModelingPipeline)
3735
export(selectBestModel)
3836
export(shuffleLabels)
39-
export(skipImbalancedMatrix)
4037
export(splitMLInputTibble)
4138
export(tuneGrid)
4239
import(arrow)
4340
import(dplyr)
41+
import(ggplot2)
42+
import(ggrepel)
4443
import(purrr)
4544
import(stringr)
4645
import(tibble)

R/arg_check_ml.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ NULL
429429
#' @noRd
430430
#' @keywords internal
431431
#' @param select_best_metric [chr] Metric to select best model: "f_meas",
432-
#' "pr_auc", "mcc, or "bal_accuracy"
432+
#' "pr_auc", "mcc", or "bal_accuracy"
433433
#'
434434
.checkArgSelectBestMetric <- function(select_best_metric) {
435435
if (!(select_best_metric %in% c("f_meas", "pr_auc", "mcc", "bal_accuracy"))) {
@@ -454,7 +454,7 @@ NULL
454454
if (!(".pred_class" %in% colnames(test_data_plus_predictions))) {
455455
stop(paste(
456456
"`test_data_plus_predictions` is missing a `.pred_class`",
457-
"column. Try using the output of `predict()`."
457+
"column. Try using the output of `predictML()`."
458458
))
459459
}
460460
}

0 commit comments

Comments
 (0)