Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
make spelling corrections - sync with dev versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dewittpe committed May 27, 2021
1 parent c02ed11 commit 10c86e5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Dockerfile_R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
FROM r-base:latest

################################################################################
## HACKATHON USERS - EDITS THE FOLLOWING LINES TO INSTLL NEEDED DEPENDENCIES ##
## HACKATHON USERS - EDIT THE FOLLOWING LINES TO INSTALL NEEDED DEPENDENCIES ##

# system
# RUN apt-get install -qy libxml2-dev
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile_py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
# HACKATHON USERS - Only edit the rows needed to install system dependencies and
# additional R packages.
# additional Python packages.
#
################################################################################
## HACKATHON USERS --- DO NOT EDIT THIS SECTION ##
Expand All @@ -9,7 +9,7 @@ FROM continuumio/miniconda3:latest
RUN conda install -c conda-forge rpy2

################################################################################
## HACKATHON USERS - EDITS THE FOLLOWING LINES TO INSTLL NEEDED DEPENDENCIES ##
## HACKATHON USERS - EDIT THE FOLLOWING LINES TO INSTALL NEEDED DEPENDENCIES ##

# system
# RUN apt-get install -qy libxml2-dev
Expand Down
4 changes: 2 additions & 2 deletions mortality_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ mortality_model <- function(data) {
# part of the hackathon.
#
# Return:
# A charcter vector of length equal to the nrow(newdata) with values
# A character vector of length equal to the nrow(newdata) with values
# "Mortality" and "Alive"
#
predict.hackathon_mortality_model <- function(object, newdata, ...) {

##############################################################################
# User Defined data preperation code starts here
# User Defined data preparation code starts here

p <- stats::predict.glm(object, newdata, type = "response", ...)
ifelse(p > 0.25, "Mortality", "Alive")
Expand Down
2 changes: 1 addition & 1 deletion mortality_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def mortality_model(data):
def predict_mortality(model, newdata):

############################################################################
# User Defined data preperation code starts here
# User Defined data preparation code starts here
xmat = newdata[["age", "female", "gcs_use", "icpyn1"]]
p = model.predict_proba(xmat)
return np.where(p[:, 1] > 0.25, "Mortality", "Alive")
Expand Down
8 changes: 4 additions & 4 deletions prepare_fss_data.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
################################################################################
# Prepare FSS Data
#
# Define data procesing steps to apply to the data set used to train and test
# models for predicting fss.
# Define data processing steps to apply to the data set used to train and test
# models for predicting FSS.
#
# Args:
# training (logicial) if the data set to read in is the training or testing
# training (logical) if the data set to read in is the training or testing
# data set.
#
# Return:
# A pandas data.frame with the defnined primary outcome and any user specific
# A pandas data.frame with the defined primary outcome and any user-specific
# elements needed for training and testing their model.
#

Expand Down
8 changes: 4 additions & 4 deletions prepare_mortality_data.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
################################################################################
# Prepare Mortality Data
#
# Define data procesing steps to apply to the data set used to train and test
# Define data processing steps to apply to the data set used to train and test
# models for predicting mortality.
#
# Args:
# training (logicial) if the data set to read in is the training or testing
# training (logical) if the data set to read in is the training or testing
# data set.
#
# Return:
# A data.frame with the defnined primary outcome and any user specific
# A data.frame with the defined primary outcome and any user specific
# elements needed for training and testing their model.
#
prepare_mortality_data <- function(training = TRUE) {
Expand All @@ -30,7 +30,7 @@ prepare_mortality_data <- function(training = TRUE) {
# Omit some elements - FSS is omitted from this data set. FSS could not be
# assessed for patients who died. To reduce confusion FSS related elements
# are omitted as missing values for FSS are be highly correlated with
# mortalily.
# mortality.
hackathon_mortality_data[-grep("fss", names(hackathon_mortality_data))]

##############################################################################
Expand Down
2 changes: 1 addition & 1 deletion prepare_mortality_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def prepare_mortality_data(training = True):
# Omit some elements - FSS is omitted from this data set. FSS could not be
# assessed for patients who died. To reduce confusion FSS related elements
# are omitted as missing values for FSS are be highly correlated with
# mortalily.
# mortality.
#for c in hackathon_mortality_data.filter(regex = "fss").columns:
# hackathon_mortality_data = hackathon_mortality_data.drop(columns = c)
hackathon_mortality_data = hackathon_mortality_data.filter(regex = "^(?!.*fss.*)")
Expand Down

0 comments on commit 10c86e5

Please sign in to comment.