Git Product home page Git Product logo

keser's Introduction

KESER: Knowledge Extraction via Sparse Embedding Regression (KESER)

CRAN

Overview

The increasing availability of Electronic Health Record (EHR) systems has created enormous potential for translational research. While the huge amount of information in EHR can be used in clinical informatics tasks, data mining for EHR data with complex structure is challenging. Traditional data mining approaches require domain knowledge to select relevant codes, which hampers the efficiency for translational research.

This packages implements the Knowledge Extraction via Sparse Embedding Regression (KESER) algorithm from our working paper, which is currently available upon request. We provide functions to use large scale code embeddings to facilitate effective feature selection and knowledge discovery with EHR data. A main advantage of the proposed embedding-based method over the existing feature selection algorithms is that it can be performed based on only summary data that can be shared across research groups (see below for the workflow).

Getting Started

Install the KESER package from GitHub and then load it into R.

# install.packages("remotes")
remotes::install_github("celehs/KESER")
library(KESER)

Load the clinical embeddings for the depression data example. One can follow the instructions HERE to derive clinical embeddings from code-code coocurrence matrix.

dir <- "https://github.com/celehs/KESER/raw/master/rdata/"
data <- readRDS(url(paste0(dir, "depression.rds"), "rb"))

To perform feature selection, the input data should be a list that consists of 6 elements: X_full_lst, Y_full_lst, X_train_lst, Y_train_lst, X_valid_lst, Y_valid_lst.

str(data)
## List of 6
##  $ X_full_lst :List of 2
##   ..$ : num [1:3700, 1:387] -1.426 0.191 0.403 -0.141 -0.572 ...
##   .. ..- attr(*, "dimnames")=List of 2
##   .. .. ..$ : NULL
##   .. .. ..$ : chr [1:387] "CCS:130" "CCS:131" "CCS:156" "CCS:163" ...
##   ..$ : num [1:5400, 1:552] -1.055 -0.919 0.183 -0.657 -0.427 ...
##   .. ..- attr(*, "dimnames")=List of 2
##   .. .. ..$ : NULL
##   .. .. ..$ : chr [1:552] "CCS:130" "CCS:131" "CCS:156" "CCS:163" ...
##  $ Y_full_lst :List of 2
##   ..$ : num [1:3700] -1.298 0.097 -0.41 -0.118 -0.228 ...
##   ..$ : num [1:5400] -0.698 -0.702 -0.7 -0.259 -0.126 ...
##  $ X_train_lst:List of 2
##   ..$ : num [1:3700, 1:387] 1.23 -3.84e-01 -8.46e-02 1.28e-15 4.63e-01 ...
##   .. ..- attr(*, "dimnames")=List of 2
##   .. .. ..$ : NULL
##   .. .. ..$ : chr [1:387] "CCS:130" "CCS:131" "CCS:156" "CCS:163" ...
##   ..$ : num [1:5400, 1:552] -0.4631 -0.0193 0.461 -0.1689 0.2052 ...
##   .. ..- attr(*, "dimnames")=List of 2
##   .. .. ..$ : NULL
##   .. .. ..$ : chr [1:552] "CCS:130" "CCS:131" "CCS:156" "CCS:163" ...
##  $ Y_train_lst:List of 2
##   ..$ : num [1:3700] 1.36 2.85e-01 -6.31e-02 -7.11e-16 9.94e-01 ...
##   ..$ : num [1:5400] -0.8208 -0.6993 0.7399 0.4333 0.0566 ...
##  $ X_valid_lst:List of 2
##   ..$ : num [1:3700, 1:387] -1.32 -4.20e-01 -5.76e-02 -1.07e-15 8.26e-01 ...
##   .. ..- attr(*, "dimnames")=List of 2
##   .. .. ..$ : NULL
##   .. .. ..$ : chr [1:387] "CCS:130" "CCS:131" "CCS:156" "CCS:163" ...
##   ..$ : num [1:5400, 1:552] -1.051 -0.901 0.101 -0.688 -0.45 ...
##   .. ..- attr(*, "dimnames")=List of 2
##   .. .. ..$ : NULL
##   .. .. ..$ : chr [1:552] "CCS:130" "CCS:131" "CCS:156" "CCS:163" ...
##  $ Y_valid_lst:List of 2
##   ..$ : num [1:3700] -1.36 3.17e-01 -8.34e-02 2.64e-16 3.40e-01 ...
##   ..$ : num [1:5400] -0.707 -0.707 -0.716 -0.157 -0.215 ...

References

  • Large Scale Code Embedding with Applications to Feature Selection and Knowledge Discovery in Electronic Health Records. Working Paper.

keser's People

Contributors

celehs avatar mingstat avatar apvidul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.