Skip to content

Commit

Permalink
Merge branch 'main' into booting3
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelS1 committed Nov 25, 2024
2 parents 422a1b1 + 86cff61 commit 17f3784
Show file tree
Hide file tree
Showing 65 changed files with 12,628 additions and 9,788 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
on:
workflow_dispatch:
pull_request:
branches:
- main
Expand Down Expand Up @@ -40,15 +39,6 @@ jobs:
with:
tinytex: true

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: "4.2.2"

- name: Install rmarkdown
run: Rscript -e 'install.packages("rmarkdown")'

- name: Render book
run: make render

Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [closed]
branches:
- main

name: publish

jobs:
build-book:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -21,23 +17,12 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: "4.2.2"

- name: Install rmarkdown
run: Rscript -e 'install.packages("rmarkdown")'

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ index.tex
/.luarc.json
book/_book/Machine-Learning-in-Survival-Analysis.pdf
*/*/figure-*
*.bbl
*.blg
*.tex
*/*/.bbl
*/*/.blg
*/*/.tex
39 changes: 7 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
# Copied from mlr-org/mlr3book
all: install serve
all: serve

.PHONY : help
help :
@echo "install : Install book and dependencies."
@echo "bookinstall : Install book without dependencies."
@echo "serve : Start a http server to serve the book."
@echo "serverefresh : Clear cache and start a http server to serve the book."
@echo "render : Render all formats."
@echo "pdf : Render book as pdf."
@echo "html : Render book as html."
@echo "serve : Clear cache and serve book on http server."
@echo "render : Clear cache and render all formats."
@echo "pdf : Clear cache and render pdf."
@echo "clean : Remove auto-generated files."
@echo "bibtex : Reformats the bibtex file."

install:
Rscript -e 'if (length(find.package("devtools", quiet = TRUE)) == 0) install.packages("devtools")' \
-e 'devtools::install_dev_deps(upgrade = "always")' \
-e 'devtools::update_packages(upgrade = "always")' \
-e 'devtools::document()' \
-e 'devtools::install()'

bookinstall:
Rscript -e 'devtools::document()' \
-e 'devtools::install()'

serve:
quarto preview book/

serveref:
quarto preview book/ --cache-refresh

clean:
$(RM) -r book/_book book/.quarto book/site_libs;\
find . -name "*.ps" -type f -delete;
Expand All @@ -38,18 +20,11 @@ clean:
find . -type d -name "*_cache" -exec rm -rf {} \;

render:
quarto render book/

html:
quarto render book/ --to html
quarto render book/ --cache-refresh

pdf:
quarto render book/ --to pdf

pdfref:
quarto render book/ --to pdf --cache-refresh


bibtex:
biber --tool --output-align --output-indent=2 --output-fieldcase=lower book/book.bib -O book/book.bib
rm book/book.bib.blg
biber --tool --output-align --output-indent=2 --output-fieldcase=lower book/library.bib -O book/library.bib
rm book/library.bib.blg
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ We will continue to update this version after publication to correct mistakes (b
Whilst this book remains a work in progress you can cite as

```
Sonabend. R, Bender. A. 2023. Machine Learning in Survival Analysis.
Sonabend. R, Bender. A. 2024. Machine Learning in Survival Analysis.
https://www.mlsabook.com.
```

Or in BibTeX format

```
@book{MLSA2023,
@book{MLSA2024,
title = "Machine Learning in Survival Analysis",
author = "Sonabend, Raphael and Bender, Andreas",
year = "2023",
year = "2024",
note = "https://www.mlsabook.com"
}
```
Expand Down
Binary file modified book/Figures/evaluation/calibD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/Figures/evaluation/calibKM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified book/Figures/evaluation/weights.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/Figures/forests/bootstrap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/Figures/forests/cars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed book/Figures/forests/iris_tree.png
Binary file not shown.
Binary file added book/Figures/forests/logrank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/Figures/forests/lung.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/Figures/ml/cv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/Figures/ml/nested.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/Figures/ml/resampling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
128 changes: 128 additions & 0 deletions book/Figures/svm/comparable.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36" version="24.7.17">
<diagram name="Page-1" id="5tOjl4HfmyMNKUskxnv7">
<mxGraphModel dx="633" dy="591" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="JCxpP6-IVKscoXu_yP8f-50" value="(i=6, j(i)=4)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontFamily=Helvetica;fontSize=10;fontColor=default;labelBackgroundColor=default;spacing=0;" vertex="1" parent="1">
<mxGeometry x="564" y="640" width="70" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-95" value="" style="endArrow=classic;html=1;rounded=0;strokeWidth=1;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="330" y="621" as="sourcePoint" />
<mxPoint x="650" y="621" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-96" value="&lt;span style=&quot;font-size: 10px;&quot;&gt;Outcome time&lt;/span&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="640" y="614" width="81" height="30" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-116" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#78bf9c;strokeWidth=1.5;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=open;fillColor=#e3c800;endFill=0;endSize=10;" edge="1" parent="1" source="JCxpP6-IVKscoXu_yP8f-97" target="JCxpP6-IVKscoXu_yP8f-112">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="450" y="564" />
<mxPoint x="450" y="700" />
<mxPoint x="402" y="700" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-97" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;flipH=0;flipV=0;" vertex="1" parent="1">
<mxGeometry x="440" y="544" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-114" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=1;entryDx=0;entryDy=0;strokeColor=#8DB06A;strokeWidth=1.5;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=open;fillColor=#e3c800;endFill=0;endSize=10;" edge="1" parent="1" source="JCxpP6-IVKscoXu_yP8f-98" target="JCxpP6-IVKscoXu_yP8f-112">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="514" y="680" />
<mxPoint x="412" y="680" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-98" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;flipH=0;flipV=0;" vertex="1" parent="1">
<mxGeometry x="504" y="518" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-99" value="" style="endArrow=classic;html=1;rounded=0;strokeWidth=1;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="330" y="621" as="sourcePoint" />
<mxPoint x="330" y="460" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-100" value="&lt;span style=&quot;font-size: 10px;&quot;&gt;Observation&lt;/span&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontStyle=1" vertex="1" parent="1">
<mxGeometry x="315" y="430" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-101" value="&lt;b&gt;1&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="594" width="25" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-102" value="&lt;b&gt;2&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="569" width="25" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-103" value="&lt;b&gt;4&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="518" width="25" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-104" value="&lt;b&gt;3&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="544" width="25" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-105" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;flipH=0;flipV=0;" vertex="1" parent="1">
<mxGeometry x="560" y="493" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-47" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;strokeColor=#FFCC99;strokeWidth=1.5;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=open;fillColor=#fa6800;endFill=0;endSize=10;entryX=0;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="JCxpP6-IVKscoXu_yP8f-105" target="JCxpP6-IVKscoXu_yP8f-98">
<mxGeometry relative="1" as="geometry">
<mxPoint x="571" y="399" as="sourcePoint" />
<mxPoint x="438" y="559" as="targetPoint" />
<Array as="points">
<mxPoint x="570" y="513" />
<mxPoint x="570" y="660" />
<mxPoint x="504" y="660" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-48" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;strokeColor=#9999FF;strokeWidth=1.5;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=open;fillColor=#6d8764;endFill=0;endSize=10;" edge="1" parent="1" source="JCxpP6-IVKscoXu_yP8f-112" target="JCxpP6-IVKscoXu_yP8f-121">
<mxGeometry relative="1" as="geometry">
<mxPoint x="538" y="400" as="sourcePoint" />
<mxPoint x="335" y="614" as="targetPoint" />
<Array as="points">
<mxPoint x="392" y="720" />
<mxPoint x="345" y="720" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-110" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;flipH=0;flipV=0;" vertex="1" parent="1">
<mxGeometry x="620" y="468" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-111" value="&lt;b&gt;5&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="493" width="25" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-112" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;flipH=0;flipV=0;" vertex="1" parent="1">
<mxGeometry x="392" y="569" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-113" style="edgeStyle=orthogonalEdgeStyle;shape=connector;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;strokeColor=#FF9999;strokeWidth=1.5;align=center;verticalAlign=middle;fontFamily=Helvetica;fontSize=11;fontColor=default;labelBackgroundColor=default;endArrow=open;fillColor=#fad7ac;endFill=0;entryX=0.75;entryY=1;entryDx=0;entryDy=0;endSize=10;" edge="1" parent="1" source="JCxpP6-IVKscoXu_yP8f-110" target="JCxpP6-IVKscoXu_yP8f-98">
<mxGeometry relative="1" as="geometry">
<mxPoint x="468" y="542" as="sourcePoint" />
<mxPoint x="448" y="569" as="targetPoint" />
<Array as="points">
<mxPoint x="630" y="488" />
<mxPoint x="630" y="640" />
<mxPoint x="519" y="640" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-117" value="&lt;b&gt;6&lt;/b&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="300" y="468" width="25" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-118" value="(i=5, j(i)=4)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontFamily=Helvetica;fontSize=10;fontColor=default;labelBackgroundColor=default;spacing=0;" vertex="1" parent="1">
<mxGeometry x="507" y="658" width="70" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-119" value="(i=4, j(i)=2)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontFamily=Helvetica;fontSize=10;fontColor=default;labelBackgroundColor=default;spacing=0;" vertex="1" parent="1">
<mxGeometry x="444" y="677" width="70" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-120" value="(i=3, j(i)=2)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontFamily=Helvetica;fontSize=10;fontColor=default;labelBackgroundColor=default;spacing=0;" vertex="1" parent="1">
<mxGeometry x="390" y="699" width="70" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-121" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#dae8fc;strokeColor=#6c8ebf;flipH=0;flipV=0;" vertex="1" parent="1">
<mxGeometry x="335" y="594" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="JCxpP6-IVKscoXu_yP8f-122" value="(i=2, j(i)=1)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontFamily=Helvetica;fontSize=10;fontColor=default;labelBackgroundColor=default;spacing=0;" vertex="1" parent="1">
<mxGeometry x="333" y="717" width="70" height="20" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Binary file added book/Figures/svm/comparable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 17f3784

Please sign in to comment.