Data taken from GSE145370 Immune suppressive landscape in a human esophageal squamous cell carcinoma microenvironment. High-dimensional single-cell RNA sequencing (10X Genomics) was used to profile the transcriptomes of total immune cells isolated from seven surgically removed ESSC tumors and their matched adjacent normal tissues. Keras tensorflow neural network modeling of immune compartments which have been annotated with the R package, SingleR, using training (3 patient tumor biopsies) and validation (2 patient tumor biopsies) datasets comparing tumor tissues and normal adjacent tissues. In this analysis, single cell hematopoietic stem cell transcriptomes were compared between tumor and adjacent tissues for differentially expressed genes.

## Registered S3 method overwritten by 'quantmod':
##   method            from
##   as.zoo.data.frame zoo
## ── Attaching core tidyquant packages ──────────────────────── tidyquant 1.0.9 ──
## ✔ PerformanceAnalytics 2.0.4      ✔ TTR                  0.24.4
## ✔ quantmod             0.4.26     ✔ xts                  0.14.1
## ── Conflicts ────────────────────────────────────────── tidyquant_conflicts() ──
## ✖ zoo::as.Date()                 masks base::as.Date()
## ✖ zoo::as.Date.numeric()         masks base::as.Date.numeric()
## ✖ PerformanceAnalytics::legend() masks graphics::legend()
## ✖ quantmod::summary()            masks base::summary()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## Loading required package: dplyr
## 
## 
## ######################### Warning from 'xts' package ##########################
## #                                                                             #
## # The dplyr lag() function breaks how base R's lag() function is supposed to  #
## # work, which breaks lag(my_xts). Calls to lag(my_xts) that you type or       #
## # source() into this session won't work correctly.                            #
## #                                                                             #
## # Use stats::lag() to make sure you're not using dplyr::lag(), or you can add #
## # conflictRules('dplyr', exclude = 'lag') to your .Rprofile to stop           #
## # dplyr from breaking base R's lag() function.                                #
## #                                                                             #
## # Code in packages is not affected. It's protected by R's namespace mechanism #
## # Set `options(xts.warn_dplyr_breaks_lag = FALSE)` to suppress this warning.  #
## #                                                                             #
## ###############################################################################
## 
## 
## Attaching package: 'dplyr'
## 
## 
## The following objects are masked from 'package:xts':
## 
##     first, last
## 
## 
## The following object is masked from 'package:lime':
## 
##     explain
## 
## 
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## 
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## 
## 
## 
## Attaching package: 'recipes'
## 
## 
## The following object is masked from 'package:stats':
## 
##     step
## 
## 
## 
## Attaching package: 'yardstick'
## 
## 
## The following object is masked from 'package:keras3':
## 
##     get_weights
## 
## 
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats   1.0.0     ✔ readr     2.1.5
## ✔ ggplot2   3.5.1     ✔ stringr   1.5.1
## ✔ lubridate 1.9.3     ✔ tibble    3.2.1
## ✔ purrr     1.0.2     ✔ tidyr     1.3.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::explain() masks lime::explain()
## ✖ dplyr::filter()  masks stats::filter()
## ✖ dplyr::first()   masks xts::first()
## ✖ stringr::fixed() masks recipes::fixed()
## ✖ dplyr::lag()     masks stats::lag()
## ✖ dplyr::last()    masks xts::last()
## ✖ readr::spec()    masks yardstick::spec()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## 
## Attaching package: 'tensorflow'
## 
## 
## The following objects are masked from 'package:keras3':
## 
##     set_random_seed, shape
## 
## 
## Loading required package: SeuratObject
## 
## Loading required package: sp
## 
## 'SeuratObject' was built with package 'Matrix' 1.6.5 but the current
## version is 1.7.1; it is recomended that you reinstall 'SeuratObject' as
## the ABI for 'Matrix' may have changed
## 
## 
## Attaching package: 'SeuratObject'
## 
## 
## The following objects are masked from 'package:base':
## 
##     intersect, t
## 
## 
## Registered S3 method overwritten by 'spatstat.geom':
##   method       from     
##   print.metric yardstick
## 
## 
## ----------------------------------------------------------------------
## 
## Your next step is to start H2O:
##     > h2o.init()
## 
## For H2O package documentation, ask for help:
##     > ??h2o
## 
## After starting H2O, you can use the Web UI at http://localhost:54321
## For more information visit https://docs.h2o.ai
## 
## ----------------------------------------------------------------------
## 
## 
## 
## Attaching package: 'h2o'
## 
## 
## The following objects are masked from 'package:lubridate':
## 
##     day, hour, month, week, year
## 
## 
## The following objects are masked from 'package:stats':
## 
##     cor, sd, var
## 
## 
## The following objects are masked from 'package:base':
## 
##     &&, %*%, %in%, ||, apply, as.factor, as.numeric, colnames,
##     colnames<-, ifelse, is.character, is.factor, is.numeric, log,
##     log10, log1p, log2, round, signif, trunc
## 
## 
## Loading required package: AnnotationDbi
## 
## Loading required package: stats4
## 
## Loading required package: BiocGenerics
## 
## 
## Attaching package: 'BiocGenerics'
## 
## 
## The following objects are masked from 'package:h2o':
## 
##     colnames, sd, var
## 
## 
## The following object is masked from 'package:SeuratObject':
## 
##     intersect
## 
## 
## The following objects are masked from 'package:lubridate':
## 
##     intersect, setdiff, union
## 
## 
## The following objects are masked from 'package:dplyr':
## 
##     combine, intersect, setdiff, union
## 
## 
## The following object is masked from 'package:keras3':
## 
##     normalize
## 
## 
## The following objects are masked from 'package:stats':
## 
##     IQR, mad, sd, var, xtabs
## 
## 
## The following objects are masked from 'package:base':
## 
##     anyDuplicated, aperm, append, as.data.frame, basename, cbind,
##     colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
##     get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
##     match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
##     Position, rank, rbind, Reduce, rownames, sapply, setdiff, table,
##     tapply, union, unique, unsplit, which.max, which.min
## 
## 
## Loading required package: Biobase
## 
## Welcome to Bioconductor
## 
##     Vignettes contain introductory material; view with
##     'browseVignettes()'. To cite Bioconductor, see
##     'citation("Biobase")', and for packages 'citation("pkgname")'.
## 
## 
## Loading required package: IRanges
## 
## Loading required package: S4Vectors
## 
## 
## Attaching package: 'S4Vectors'
## 
## 
## The following objects are masked from 'package:lubridate':
## 
##     second, second<-
## 
## 
## The following object is masked from 'package:tidyr':
## 
##     expand
## 
## 
## The following objects are masked from 'package:dplyr':
## 
##     first, rename
## 
## 
## The following object is masked from 'package:xts':
## 
##     first
## 
## 
## The following object is masked from 'package:utils':
## 
##     findMatches
## 
## 
## The following objects are masked from 'package:base':
## 
##     expand.grid, I, unname
## 
## 
## 
## Attaching package: 'IRanges'
## 
## 
## The following object is masked from 'package:sp':
## 
##     %over%
## 
## 
## The following object is masked from 'package:lubridate':
## 
##     %within%
## 
## 
## The following object is masked from 'package:purrr':
## 
##     reduce
## 
## 
## The following objects are masked from 'package:dplyr':
## 
##     collapse, desc, slice
## 
## 
## 
## Attaching package: 'AnnotationDbi'
## 
## 
## The following object is masked from 'package:dplyr':
## 
##     select
## 
## 
## 
## 
## 
## Attaching package: 'plotly'
## 
## 
## The following object is masked from 'package:AnnotationDbi':
## 
##     select
## 
## 
## The following object is masked from 'package:IRanges':
## 
##     slice
## 
## 
## The following object is masked from 'package:S4Vectors':
## 
##     rename
## 
## 
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## 
## 
## The following object is masked from 'package:stats':
## 
##     filter
## 
## 
## The following object is masked from 'package:graphics':
## 
##     layout
## 
## 
## 
## Attaching package: 'htmlwidgets'
## 
## 
## The following object is masked from 'package:Seurat':
## 
##     JS
## 
## 
## The following object is masked from 'package:SeuratObject':
## 
##     JS
## 
## 
## 
## Attaching package: 'caTools'
## 
## 
## The following object is masked from 'package:IRanges':
## 
##     runmean
## 
## 
## The following object is masked from 'package:S4Vectors':
## 
##     runmean
## 
## 
## Loading required package: carData
## 
## 
## Attaching package: 'car'
## 
## 
## The following object is masked from 'package:purrr':
## 
##     some
## 
## 
## The following object is masked from 'package:dplyr':
## 
##     recode
## 
## 
## Loading required package: lattice
## 
## 
## Attaching package: 'caret'
## 
## 
## The following object is masked from 'package:tensorflow':
## 
##     train
## 
## 
## The following object is masked from 'package:purrr':
## 
##     lift
## 
## 
## The following objects are masked from 'package:yardstick':
## 
##     precision, recall, sensitivity, specificity
## 
## 
## 
## Attaching package: 'InformationValue'
## 
## 
## The following objects are masked from 'package:caret':
## 
##     confusionMatrix, precision, sensitivity, specificity
## 
## 
## The following objects are masked from 'package:yardstick':
## 
##     npv, precision, sensitivity, specificity
## 
## 
## Type 'citation("pROC")' for a citation.
## 
## 
## Attaching package: 'pROC'
## 
## 
## The following objects are masked from 'package:IRanges':
## 
##     cov, var
## 
## 
## The following objects are masked from 'package:S4Vectors':
## 
##     cov, var
## 
## 
## The following object is masked from 'package:BiocGenerics':
## 
##     var
## 
## 
## The following object is masked from 'package:h2o':
## 
##     var
## 
## 
## The following objects are masked from 'package:stats':
## 
##     cov, smooth, var
## 
## 
## Loading required package: SummarizedExperiment
## 
## Loading required package: MatrixGenerics
## 
## Loading required package: matrixStats
## 
## 
## Attaching package: 'matrixStats'
## 
## 
## The following objects are masked from 'package:Biobase':
## 
##     anyMissing, rowMedians
## 
## 
## The following object is masked from 'package:dplyr':
## 
##     count
## 
## 
## 
## Attaching package: 'MatrixGenerics'
## 
## 
## The following objects are masked from 'package:matrixStats':
## 
##     colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
##     colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
##     colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
##     colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
##     colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
##     colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
##     colWeightedMeans, colWeightedMedians, colWeightedSds,
##     colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
##     rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
##     rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
##     rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
##     rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
##     rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
##     rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
##     rowWeightedSds, rowWeightedVars
## 
## 
## The following object is masked from 'package:Biobase':
## 
##     rowMedians
## 
## 
## Loading required package: GenomicRanges
## 
## Loading required package: GenomeInfoDb
## 
## 
## Attaching package: 'SummarizedExperiment'
## 
## 
## The following object is masked from 'package:Seurat':
## 
##     Assays
## 
## 
## The following object is masked from 'package:SeuratObject':
## 
##     Assays
## 
## 
## 
## Attaching package: 'SingleR'
## 
## 
## The following objects are masked from 'package:celldex':
## 
##     BlueprintEncodeData, DatabaseImmuneCellExpressionData,
##     HumanPrimaryCellAtlasData, ImmGenData, MonacoImmuneData,
##     MouseRNAseqData, NovershternHematopoieticData
## 
## 
## 
## Attaching package: 'data.tree'
## 
## 
## The following object is masked from 'package:Biobase':
## 
##     Aggregate
## 
## escc.normal  escc.tumor 
##         102         102

The 111 differentially expressed genes were used as features for tensorflow classifications of tumor cells when comparing to normal adjacent cells. Model training was performed with 3 patient biopsies and validated on 2 separate patient biopsies. Yes= tumor, No= adjacent.

## [1] "escc.normal" "escc.tumor"
## 
## escc.normal  escc.tumor 
##         102         102
## 
##   0   1 
## 102 102
## 
##   0   1 
## 102 102
## 
## escc.normal  escc.tumor 
##         426         426
## [1] "escc.normal" "escc.tumor"
## 
## escc.normal  escc.tumor 
##         426         426
## 
##   0   1 
## 426 426
## 'data.frame':    204 obs. of  111 variables:
##  $ MS4A2   : num  4 0 0 2 0 0 2 4 13 2 ...
##  $ MALAT1  : num  46 55 115 39 22 26 56 18 141 24 ...
##  $ IFITM1  : num  5 33 11 0 1 24 0 0 0 0 ...
##  $ MIF     : num  2 50 22 0 1 4 0 0 5 0 ...
##  $ KIT     : num  3 0 0 0 1 0 2 0 9 0 ...
##  $ HPGDS   : num  2 0 0 0 0 0 1 7 3 1 ...
##  $ MT2A    : num  0 9 12 0 0 8 0 0 1 0 ...
##  $ HLA-A   : num  4 16 13 0 2 17 0 0 3 0 ...
##  $ RPL28   : num  12 89 77 3 6 7 7 4 27 4 ...
##  $ EMP3    : num  1 1 2 1 0 0 1 2 2 4 ...
##  $ VIM     : num  7 1 13 3 4 1 6 5 44 2 ...
##  $ HSPA1A  : num  0 1 4 10 0 0 0 19 0 0 ...
##  $ LGALS3  : num  1 3 0 0 2 0 1 0 11 1 ...
##  $ ITM2B   : num  4 8 3 0 1 3 0 4 5 2 ...
##  $ IFITM3  : num  2 67 16 0 0 37 0 2 0 2 ...
##  $ ANXA1   : num  2 0 0 0 1 1 1 4 4 5 ...
##  $ RPS19   : num  2 72 112 0 0 5 2 0 24 0 ...
##  $ VWA5A   : num  0 0 1 1 1 0 1 0 0 0 ...
##  $ B2M     : num  63 47 147 4 8 50 10 5 23 5 ...
##  $ ACSL4   : num  0 0 0 1 0 0 0 0 5 0 ...
##  $ HLA-C   : num  3 7 9 0 1 13 0 0 1 0 ...
##  $ CPA3    : num  30 0 0 3 4 0 1 9 22 3 ...
##  $ ACTB    : num  7 85 75 0 3 42 12 21 36 7 ...
##  $ CD74    : num  7 11 119 0 0 24 0 0 1 0 ...
##  $ SAT1    : num  1 2 5 1 2 1 0 1 8 0 ...
##  $ HLA-B   : num  7 14 31 0 0 19 0 1 3 0 ...
##  $ ACTR3   : num  0 5 9 0 0 0 0 0 1 1 ...
##  $ HMGN2   : num  2 26 10 0 0 0 1 0 1 0 ...
##  $ DDX5    : num  0 1 5 1 0 1 1 0 2 0 ...
##  $ CD63    : num  2 1 0 0 0 1 0 2 3 5 ...
##  $ MT-ND3  : num  3 6 52 5 3 1 0 0 19 2 ...
##  $ RPS9    : num  3 22 24 0 2 5 0 1 9 0 ...
##  $ HSPE1   : num  0 6 17 20 0 2 0 0 0 0 ...
##  $ S100A11 : num  0 54 11 0 1 5 0 0 3 0 ...
##  $ MT-ND4L : num  2 4 109 7 1 1 5 0 29 9 ...
##  $ PCBP1   : num  0 2 6 0 1 1 0 2 1 0 ...
##  $ HSP90AB1: num  2 29 7 5 0 1 0 2 6 0 ...
##  $ MT-CYB  : num  1 1 58 2 2 1 2 1 13 4 ...
##  $ MT-ND4  : num  0 0 58 5 3 0 0 0 4 0 ...
##  $ TMSB10  : num  2 50 206 1 1 15 2 3 3 1 ...
##  $ LMO4    : num  0 0 3 0 0 1 0 4 10 1 ...
##  $ POLR2L  : num  1 24 6 0 0 2 0 0 2 0 ...
##  $ HSP90AA1: num  0 19 75 16 0 1 0 21 1 1 ...
##  $ HSPA8   : num  3 12 20 6 0 1 1 5 1 0 ...
##  $ CD99    : num  0 2 1 0 0 0 0 2 0 1 ...
##  $ ARL6IP5 : num  0 0 1 1 0 1 1 0 2 0 ...
##  $ RPL36A  : num  0 7 6 0 0 0 1 4 5 0 ...
##  $ RPL21   : num  0 3 12 1 0 1 1 2 8 1 ...
##  $ HSPD1   : num  0 7 9 6 0 0 0 0 2 0 ...
##  $ MT-ND2  : num  0 0 32 2 2 0 0 0 3 1 ...
##  $ NSMCE1  : num  1 3 1 0 2 1 0 0 3 0 ...
##  $ AHNAK   : num  0 1 0 0 0 0 0 0 1 0 ...
##  $ MT-ND5  : num  0 2 40 3 0 2 0 0 7 0 ...
##  $ PFN1    : num  0 27 56 0 0 5 1 1 7 0 ...
##  $ HPGD    : num  1 1 0 0 0 0 0 3 1 0 ...
##  $ IL1RL1  : num  1 0 0 0 1 0 0 1 2 0 ...
##  $ SLC18A2 : num  5 0 0 0 0 0 1 1 6 1 ...
##  $ HSPA5   : num  0 0 1 0 1 2 0 0 1 0 ...
##  $ FCER1G  : num  2 0 1 2 2 5 1 0 5 1 ...
##  $ CD44    : num  1 2 0 0 2 1 1 1 3 1 ...
##  $ RPL35   : num  3 13 37 1 0 1 0 1 15 3 ...
##  $ S100A6  : num  4 44 45 2 2 0 4 12 7 6 ...
##  $ LAPTM4A : num  3 4 0 1 1 0 1 2 7 2 ...
##  $ CFL1    : num  3 42 52 0 0 7 1 0 2 0 ...
##  $ FOXP1   : num  2 0 4 0 0 0 1 0 1 0 ...
##  $ GAPDH   : num  1 133 48 0 2 7 0 6 4 1 ...
##  $ RBM39   : num  0 0 3 0 0 0 0 0 5 0 ...
##  $ SNX3    : num  0 7 9 1 0 0 1 0 3 0 ...
##  $ NEAT1   : num  1 0 9 1 0 1 0 0 15 0 ...
##  $ CLIC1   : num  0 10 7 0 0 3 1 2 8 2 ...
##  $ CKLF    : num  3 1 10 0 0 3 1 0 2 0 ...
##  $ COX8A   : num  0 18 16 0 0 3 0 0 0 1 ...
##  $ SQSTM1  : num  1 3 4 0 0 0 1 0 3 0 ...
##  $ SARAF   : num  3 1 0 1 1 1 2 0 5 0 ...
##  $ TNFAIP3 : num  7 2 1 0 3 1 5 0 23 0 ...
##  $ BTG1    : num  0 10 7 0 1 2 2 0 3 0 ...
##  $ TMSB4X  : num  9 49 113 2 1 36 0 0 13 0 ...
##  $ FOS     : num  29 0 10 2 3 0 0 0 30 0 ...
##  $ COMMD6  : num  0 2 5 1 0 1 0 0 1 0 ...
##  $ PFDN5   : num  1 8 21 1 3 4 0 0 3 0 ...
##  $ S100A10 : num  0 1 0 0 0 1 0 3 1 1 ...
##  $ COX6A1  : num  0 19 9 0 0 4 1 0 1 1 ...
##  $ IFITM2  : num  2 2 5 0 0 3 0 3 4 0 ...
##  $ FOSB    : num  5 0 0 2 3 0 0 0 13 1 ...
##  $ NME2    : num  0 28 10 0 0 0 0 0 5 0 ...
##  $ UQCR10  : num  1 11 10 0 0 0 0 0 0 0 ...
##  $ SRSF5   : num  1 1 7 0 0 0 0 0 1 0 ...
##  $ S100A4  : num  4 0 7 2 2 0 4 5 2 1 ...
##  $ CD69    : num  10 2 0 0 1 0 2 0 29 1 ...
##  $ PRDX6   : num  0 5 2 0 1 0 0 2 3 1 ...
##  $ SKP1    : num  0 5 1 0 0 2 1 0 0 1 ...
##  $ COX5B   : num  2 41 5 0 0 1 0 1 2 0 ...
##  $ COX6B1  : num  0 13 6 0 0 1 0 1 0 0 ...
##  $ MYL12A  : num  0 11 8 0 0 3 1 3 2 2 ...
##  $ PPIA    : num  0 78 32 0 1 3 1 2 6 0 ...
##  $ SUMO2   : num  1 16 18 0 0 2 0 0 4 0 ...
##  $ MT-ND1  : num  1 3 51 0 0 0 0 0 16 1 ...
##  $ AKAP13  : num  2 5 1 0 0 0 0 0 5 0 ...
##  $ FTL     : num  3 54 44 0 8 0 5 8 26 1 ...
##   [list output truncated]
## Epoch 1/50
## 43/43 - 1s - 17ms/step - accuracy: 0.5869 - loss: 0.6859 - val_accuracy: 0.7840 - val_loss: 0.6710
## Epoch 2/50
## 43/43 - 0s - 2ms/step - accuracy: 0.7981 - loss: 0.6259 - val_accuracy: 0.8521 - val_loss: 0.5732
## Epoch 3/50
## 43/43 - 0s - 1ms/step - accuracy: 0.8427 - loss: 0.5247 - val_accuracy: 0.8803 - val_loss: 0.4781
## Epoch 4/50
## 43/43 - 0s - 2ms/step - accuracy: 0.8803 - loss: 0.4374 - val_accuracy: 0.8873 - val_loss: 0.4102
## Epoch 5/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9038 - loss: 0.3769 - val_accuracy: 0.9061 - val_loss: 0.3614
## Epoch 6/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9155 - loss: 0.3253 - val_accuracy: 0.9061 - val_loss: 0.3277
## Epoch 7/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9343 - loss: 0.2864 - val_accuracy: 0.8991 - val_loss: 0.3046
## Epoch 8/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9319 - loss: 0.2620 - val_accuracy: 0.9178 - val_loss: 0.2732
## Epoch 9/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9366 - loss: 0.2375 - val_accuracy: 0.9038 - val_loss: 0.2677
## Epoch 10/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9390 - loss: 0.2298 - val_accuracy: 0.9202 - val_loss: 0.2545
## Epoch 11/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9343 - loss: 0.2128 - val_accuracy: 0.9225 - val_loss: 0.2404
## Epoch 12/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9531 - loss: 0.1875 - val_accuracy: 0.9343 - val_loss: 0.2186
## Epoch 13/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9507 - loss: 0.1707 - val_accuracy: 0.9296 - val_loss: 0.2179
## Epoch 14/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9671 - loss: 0.1532 - val_accuracy: 0.9249 - val_loss: 0.2148
## Epoch 15/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9695 - loss: 0.1446 - val_accuracy: 0.9390 - val_loss: 0.2019
## Epoch 16/50
## 43/43 - 0s - 3ms/step - accuracy: 0.9671 - loss: 0.1393 - val_accuracy: 0.9413 - val_loss: 0.1972
## Epoch 17/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9718 - loss: 0.1203 - val_accuracy: 0.9413 - val_loss: 0.2020
## Epoch 18/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9671 - loss: 0.1253 - val_accuracy: 0.9155 - val_loss: 0.2298
## Epoch 19/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9624 - loss: 0.1338 - val_accuracy: 0.9296 - val_loss: 0.2169
## Epoch 20/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9718 - loss: 0.1212 - val_accuracy: 0.9319 - val_loss: 0.2148
## Epoch 21/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9718 - loss: 0.1133 - val_accuracy: 0.9366 - val_loss: 0.1995
## Epoch 22/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9836 - loss: 0.1048 - val_accuracy: 0.9272 - val_loss: 0.2118
## Epoch 23/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9789 - loss: 0.1091 - val_accuracy: 0.9249 - val_loss: 0.2056
## Epoch 24/50
## 43/43 - 0s - 3ms/step - accuracy: 0.9718 - loss: 0.1026 - val_accuracy: 0.9296 - val_loss: 0.2157
## Epoch 25/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9742 - loss: 0.1067 - val_accuracy: 0.9319 - val_loss: 0.2049
## Epoch 26/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9695 - loss: 0.0944 - val_accuracy: 0.9225 - val_loss: 0.2195
## Epoch 27/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9718 - loss: 0.1080 - val_accuracy: 0.9272 - val_loss: 0.2321
## Epoch 28/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9648 - loss: 0.1046 - val_accuracy: 0.9272 - val_loss: 0.2179
## Epoch 29/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9765 - loss: 0.0990 - val_accuracy: 0.9202 - val_loss: 0.2377
## Epoch 30/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9671 - loss: 0.1042 - val_accuracy: 0.9155 - val_loss: 0.2437
## Epoch 31/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9765 - loss: 0.0989 - val_accuracy: 0.9155 - val_loss: 0.2580
## Epoch 32/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9601 - loss: 0.1154 - val_accuracy: 0.9131 - val_loss: 0.2457
## Epoch 33/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9789 - loss: 0.0912 - val_accuracy: 0.9014 - val_loss: 0.2830
## Epoch 34/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9577 - loss: 0.1286 - val_accuracy: 0.8897 - val_loss: 0.3071
## Epoch 35/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9577 - loss: 0.1273 - val_accuracy: 0.8897 - val_loss: 0.3284
## Epoch 36/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9601 - loss: 0.1077 - val_accuracy: 0.8873 - val_loss: 0.3296
## Epoch 37/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9554 - loss: 0.1282 - val_accuracy: 0.8873 - val_loss: 0.3262
## Epoch 38/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9671 - loss: 0.1064 - val_accuracy: 0.8920 - val_loss: 0.3072
## Epoch 39/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9624 - loss: 0.1021 - val_accuracy: 0.9014 - val_loss: 0.2917
## Epoch 40/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9718 - loss: 0.0929 - val_accuracy: 0.9014 - val_loss: 0.2885
## Epoch 41/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9742 - loss: 0.0825 - val_accuracy: 0.9131 - val_loss: 0.2733
## Epoch 42/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9859 - loss: 0.0652 - val_accuracy: 0.9155 - val_loss: 0.2544
## Epoch 43/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9930 - loss: 0.0535 - val_accuracy: 0.9178 - val_loss: 0.2652
## Epoch 44/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9930 - loss: 0.0505 - val_accuracy: 0.9155 - val_loss: 0.2643
## Epoch 45/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9930 - loss: 0.0544 - val_accuracy: 0.9131 - val_loss: 0.2585
## Epoch 46/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9906 - loss: 0.0534 - val_accuracy: 0.9155 - val_loss: 0.2705
## Epoch 47/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9930 - loss: 0.0475 - val_accuracy: 0.9131 - val_loss: 0.2631
## Epoch 48/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9883 - loss: 0.0546 - val_accuracy: 0.9155 - val_loss: 0.2623
## Epoch 49/50
## 43/43 - 0s - 2ms/step - accuracy: 0.9906 - loss: 0.0484 - val_accuracy: 0.9178 - val_loss: 0.2807
## Epoch 50/50
## 43/43 - 0s - 1ms/step - accuracy: 0.9930 - loss: 0.0494 - val_accuracy: 0.9155 - val_loss: 0.2722
## 
## Final epoch (plot to see history):
##     accuracy: 0.993
##         loss: 0.04939
## val_accuracy: 0.9155
##     val_loss: 0.2722

## 7/7 - 0s - 14ms/step
## 7/7 - 0s - 2ms/step
## Warning: Unknown levels in `f`: 1, 0
## tibble [204 × 3] (S3: tbl_df/tbl/data.frame)
##  $ truth     : Factor w/ 2 levels "no","yes": 2 2 2 1 2 2 1 1 1 1 ...
##  $ estimate  : Factor w/ 2 levels "no","yes": 2 2 2 2 2 2 1 1 2 1 ...
##  $ class_prob: num [1:204] 0.985 0.985 0.985 0.983 0.952 ...

## Confusion Matrix and Statistics
## 
##           Reference
## Prediction no yes
##        no  67  35
##        yes  9  93
##                                           
##                Accuracy : 0.7843          
##                  95% CI : (0.7215, 0.8387)
##     No Information Rate : 0.6275          
##     P-Value [Acc > NIR] : 1.069e-06       
##                                           
##                   Kappa : 0.5686          
##                                           
##  Mcnemar's Test P-Value : 0.000164        
##                                           
##             Sensitivity : 0.7266          
##             Specificity : 0.8816          
##          Pos Pred Value : 0.9118          
##          Neg Pred Value : 0.6569          
##              Prevalence : 0.6275          
##          Detection Rate : 0.4559          
##    Detection Prevalence : 0.5000          
##       Balanced Accuracy : 0.8041          
##                                           
##        'Positive' Class : yes             
## 

Local Interpretation Model Agnostic Explanations of feature/gene weights on the validation dataset predictions.

## # A tibble: 2 × 3
##   .metric  .estimator .estimate
##   <chr>    <chr>          <dbl>
## 1 accuracy binary         0.784
## 2 kap      binary         0.569
## 7/7 - 0s - 2ms/step
## # A tibble: 204 × 2
##        Yes     No
##      <dbl>  <dbl>
##  1 0.985   0.0150
##  2 0.985   0.0150
##  3 0.985   0.0150
##  4 0.983   0.0174
##  5 0.952   0.0485
##  6 0.985   0.0150
##  7 0.00613 0.994 
##  8 0.00567 0.994 
##  9 0.975   0.0246
## 10 0.00752 0.992 
## # ℹ 194 more rows

Local Interpretable Model Agnostic Explanations of feature variables on tumor predictions. Yes= tumor, No= adjacent.

## Warning: IFITM1 does not contain enough variance to use quantile binning. Using
## standard binning instead.
## 313/313 - 0s - 362us/step

## [1] "TMSB4X"  "HPGD"    "CD74"    "S100A11" "ACTB"    "VIM"     "RPL36A" 
## [8] "IFITM2"

## 313/313 - 0s - 362us/step

## [1] "HPGD"   "ACTB"   "TMSB4X" "HMGN2"  "RPL36A" "CD74"   "VIM"    "MALAT1"
## [9] "IFITM2"