Skip to content

Commit

Permalink
Name changes in the R example files (outside of the package)
Browse files Browse the repository at this point in the history
  • Loading branch information
operdeck committed Aug 31, 2022
1 parent a04d3bd commit c638f4c
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions examples/datamart/createModelOverview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# Run an R notebook on the given inputfile with just the model data. This
# example shows how to run the notebook when there is no predictor data.

# Location of the GIT checkout of the CDH tools
cdhtools="~/Documents/pega/cdh-datascientist-tools"
modeloverviewnotebook="$cdhtools/examples/datamart/healthcheck.Rmd"
# Location of the GIT checkout of the Pega Data Scientist tools
pdstools="~/Documents/pega/pega-datascientist-tools"
modeloverviewnotebook="$pdstools/examples/datamart/healthcheck.Rmd"

# Predictor data. This can be a CSV or any other of the supported formats.
source="$cdhtools/data/pr_data_dm_admmart_mdl_fact.csv"
source="$pdstools/data/pr_data_dm_admmart_mdl_fact.csv"

# Generated file
output="`pwd`/DMSample\ Adaptive\ Models\ Overview.html"
Expand Down
8 changes: 4 additions & 4 deletions examples/datamart/createModelReport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

# Run an R notebook on the given inputfile with predictor binning data

# Location of the GIT checkout of the CDH tools
cdhtools="~/Documents/pega/cdh-datascientist-tools"
modelreportnotebook="$cdhtools/examples/datamart/modelreport.Rmd"
# Location of the GIT checkout of the Pega Data Scientist tools
pdstools="~/Documents/pega/pega-datascientist-tools"
modelreportnotebook="$pdstools/examples/datamart/modelreport.Rmd"

# Predictor data. This can be a CSV or any other of the supported formats.
source="$cdhtools/data/pr_data_dm_admmart_pred.csv"
source="$pdstools/data/pr_data_dm_admmart_pred.csv"

# Model ID to use
modelid="277a2c48-8888-5b71-911e-443d52c9b50f"
Expand Down
10 changes: 5 additions & 5 deletions examples/datamart/healthcheck.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "`r params$title`"
subtitle: "`r params$subtitle`"
author: "Pega CDH Tools"
author: "Pega"
date: "`r Sys.Date()`"
output:
html_document:
Expand Down Expand Up @@ -59,7 +59,7 @@ params:
library(pdstools)
# include below when developing the library
# sapply(list.files("~/Documents/pega/cdh-datascientist-tools/r/R", "*.R", full.names = T), source)
# sapply(list.files("~/Documents/pega/pega-datascientist-tools/r/R", "*.R", full.names = T), source)
library(data.table)
library(lubridate)
Expand All @@ -82,10 +82,10 @@ knitr::opts_chunk$set(
# ADM Datamart Health Check

This document gives a generic and global overview of the Adaptive models
and predictors. It is generated from an R notebook in the [CDH Tools](https://github.com/pegasystems/cdh-datascientist-tools). That repository
and predictors. It is generated from an R notebook in the [Pega Data Scientist Tools](https://github.com/pegasystems/pega-datascientist-tools). That repository
of tools and scripts also contains a notebook to generate stand-alone
model reports for individual models, please refer
to the [Wiki](https://github.com/pegasystems/cdh-datascientist-tools/wiki).
to the [Wiki](https://github.com/pegasystems/pega-datascientist-tools/wiki).

This document provides a first-level scan of the models after which a
deeper and more customer specific deeper dive can be done.
Expand Down Expand Up @@ -306,7 +306,7 @@ plt <- plotPerformanceSuccessRateBubbleChart(datamart,
filter = function(mdls)
{
m <- filterLatestSnapshotOnly(mdls)[ResponseCount >= 100]
m[, OhMyGoodness := (cdhtools::auc2GINI(Performance) + pmin(Positives, as.integer(params$min_positives_for_maturity)) * (1.0/as.integer(params$min_positives_for_maturity)))/2]
m[, OhMyGoodness := (pdstools::auc2GINI(Performance) + pmin(Positives, as.integer(params$min_positives_for_maturity)) * (1.0/as.integer(params$min_positives_for_maturity)))/2]
return(m)
},
facets = c("ConfigurationName", "Direction", "Channel"),
Expand Down
4 changes: 2 additions & 2 deletions examples/datamart/modelreport.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "`r params$title`"
subtitle: "`r params$modeldescription`"
author: "Pega CDH Tools"
author: "Pega"
date: "`r Sys.Date()`"
output:
html_document:
Expand Down Expand Up @@ -38,7 +38,7 @@ params:
library(pdstools)
# include below when developing the library
# sapply(list.files("~/Documents/pega/cdh-datascientist-tools/r/R", "*.R", full.names = T), source)
# sapply(list.files("~/Documents/pega/pega-datascientist-tools/r/R", "*.R", full.names = T), source)
library(data.table)
library(lubridate)
Expand Down
8 changes: 4 additions & 4 deletions examples/datamart/offlinereports.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Location of the GIT checkout of the CDH tools
# Location of the GIT checkout of the Pega Data Scientist tools

cdhtools="~/Documents/pega/cdh-datascientist-tools"
pdstools="~/Documents/pega/pega-datascientist-tools"

# Location of the input data

Expand All @@ -17,8 +17,8 @@ modellist="cdhsample-modellist.txt"

# Location of the notebooks (unless copied/modified these defaults should be fine)

modeloverviewnotebook="$cdhtools/examples/datamart/healthcheck.Rmd"
modelreportnotebook="$cdhtools/examples/datamart/modelreport.Rmd"
modeloverviewnotebook="$pdstools/examples/datamart/healthcheck.Rmd"
modelreportnotebook="$pdstools/examples/datamart/modelreport.Rmd"

# Run the model overview notebook

Expand Down
12 changes: 6 additions & 6 deletions examples/datamart/predictionsAndPredictiveModels.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ output:
---

```{r, echo=F, warning=F, error=F, include=FALSE}
library(cdhtools)
library(pdstools)
# include below when developing the library
# sapply(list.files("~/Documents/pega/cdh-datascientist-tools/r/R", "*.R", full.names = T), source)
# sapply(list.files("~/Documents/pega/pega-datascientist-tools/r/R", "*.R", full.names = T), source)
library(data.table)
library(lubridate)
Expand All @@ -26,7 +26,7 @@ theme_set(theme_light())

See https://docs.pega.com/decision-management-reference-materials/database-tables-monitoring-models and https://techdocs.rpega.com/x/nYjM.

Recommended approach to export them is described in https://github.com/pegasystems/cdh-datascientist-tools/wiki/How-to-export-and-use-the-ADM-Datamart
Recommended approach to export them is described in https://github.com/pegasystems/pega-datascientist-tools/wiki/How-to-export-and-use-the-ADM-Datamart

Internal doc on the tables: https://techdocs.rpega.com/x/cYD2Ag

Expand Down Expand Up @@ -59,7 +59,7 @@ Notifications are stored in

```{r}
dmSnapshots <- readDSExport("Data-DM-Snapshot_pyGetSnapshot", "../../data")
dmSnapshots[, pySnapShotTime := cdhtools::fromPRPCDateTime(pySnapShotTime)]
dmSnapshots[, pySnapShotTime := pdstools::fromPRPCDateTime(pySnapShotTime)]
dmSnapshots[, pyValue := as.numeric(pyValue)]
dmSnapshots %>% head() %>% kable() %>% kable_paper(bootstrap_options = "striped")
Expand All @@ -72,7 +72,7 @@ Binary distribution

```{r}
dmBinaryDistribution <- readDSExport("Data-DM-BinaryDistribution_pyGetBinaryDistribution", "../../data")
dmBinaryDistribution[, pySnapShotTime := cdhtools::fromPRPCDateTime(pySnapShotTime)]
dmBinaryDistribution[, pySnapShotTime := pdstools::fromPRPCDateTime(pySnapShotTime)]
dmBinaryDistribution %>% head() %>% kable() %>% kable_paper(bootstrap_options = "striped")
```
Expand Down Expand Up @@ -105,7 +105,7 @@ calculate the metrics shown to the user in Prediction Studio. Once the metric ha

```{r}
dmSummary <- readDSExport("Data-DM-Summary_pyGetSummaries", "../../data")
dmSummary[, pySnapShotTime := cdhtools::fromPRPCDateTime(pySnapShotTime)]
dmSummary[, pySnapShotTime := pdstools::fromPRPCDateTime(pySnapShotTime)]
dmSummary %>% head() %>% kable() %>% kable_paper(bootstrap_options = "striped")
```
Expand Down
Binary file modified images/adm_health_check_toc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c638f4c

Please sign in to comment.