Commit fd265be9 authored by Johannes Bleher's avatar Johannes Bleher
Browse files

In Class Code

parent c43df3ed
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
# Generate the probabilities of default
# Clear workspace and graphs
if(!is.null(dev.list())) dev.off()
rm(list = ls())

library("caret")
library("data.table")

load("01_data/biofilm.Rdata")

setDT(biofilm_data)

names(biofilm_data)

thefiles <- unique(biofilm_data$file)

onefile <- biofilm_data[thefiles[30]==file,]

plot(onefile$mz,onefile$int,type="h")

biofilm_data[,mz:=round(mz,1)]

setkeyv(biofilm_data,cols=c("file","indicator","mz"))

biofilm_data[,.(int=sum(int)),by=c("file","indicator","mz")]

biofilm_data_wide <- dcast(biofilm_data, file + indicator ~ mz, value.var = "int")

trainIndex <- createDataPartition(biofilm_data_wide$indicator,list=FALSE,p=0.8)

trainSet <- biofilm_data_wide[trainIndex,]
testSet <- biofilm_data_wide[-trainIndex,]

03_report/Tex/ass7.aux

deleted100644 → 0
+0 −28
Original line number Diff line number Diff line
\relax 
\providecommand\hyper@newdestlabel[2]{}
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\ifx\hyper@anchor\@undefined
\let\newlabel\oldnewlabel
\fi}
\fi}
\global\let\hyper@last\relax 
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand\HyField@AuxAddToFields[1]{}
\providecommand\HyField@AuxAddToCoFields[2]{}
\bibstyle{biblatex}
\bibdata{ass7-blx}
\citation{biblatex-control}
\abx@aux@refcontext{nty/global//global/global}
\@writefile{toc}{\contentsline {section}{\numberline {Task 1:}Clone a git repository}{1}{section.1}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {Task 2:}The \texttt  {caret} package}{1}{section.2}\protected@file@percent }
\newlabel{step:extract}{{5}{2}{Getting to know the data}{Item.7}{}}
\newlabel{step:plot}{{6}{2}{Getting to know the data}{Item.8}{}}
\newlabel{split:step1}{{13}{2}{Splitting the data set based on the outcome variable}{Item.15}{}}
\newlabel{split:step2}{{14}{2}{Splitting the data set based on the outcome variable}{Item.16}{}}
\newlabel{split:freq}{{15}{2}{Splitting the data set based on the outcome variable}{Item.17}{}}
\abx@aux@read@bbl@mdfivesum{242E9DB92557AC81F6B30CE4F9334513}
\gdef \@abspage@last{2}

03_report/Tex/ass7.bbl

deleted100644 → 0
+0 −20
Original line number Diff line number Diff line
% $ biblatex auxiliary file $
% $ biblatex bbl format version 3.2 $
% Do not modify the above lines!
%
% This is an auxiliary file used by the 'biblatex' package.
% This file may safely be deleted. It will be recreated as
% required.
%
\begingroup
\makeatletter
\@ifundefined{ver@biblatex.sty}
  {\@latex@error
     {Missing 'biblatex' package}
     {The bibliography requires the 'biblatex' package.}
      \aftergroup\endinput}
  {}
\endgroup

\datalist[entry]{nty/global//global/global}\enddatalist
\endinput

03_report/Tex/ass7.blg

deleted100644 → 0
+0 −64
Original line number Diff line number Diff line
This is BibTeX, Version 0.99d (TeX Live 2023/TeX Live for SUSE Linux)
Capacity: max_strings=200000, hash_size=200000, hash_prime=170003
The top-level auxiliary file: ass7.aux
The style file: biblatex.bst
Reallocated glb_str_ptr (elt_size=4) to 20 items from 10.
Reallocated global_strs (elt_size=200001) to 20 items from 10.
Reallocated glb_str_end (elt_size=4) to 20 items from 10.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated wiz_functions (elt_size=4) to 6000 items from 3000.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Reallocated singl_function (elt_size=4) to 100 items from 50.
Database file #1: ass7-blx.bib
Biblatex version: 3.19
Reallocated wiz_functions (elt_size=4) to 9000 items from 6000.
Reallocated singl_function (elt_size=4) to 100 items from 50.
You've used 1 entry,
            6399 wiz_defined-function locations,
            1202 strings with 8960 characters,
and the built_in function-call counts, 1534 in all, are:
= -- 73
> -- 70
< -- 1
+ -- 49
- -- 28
* -- 32
:= -- 370
add.period$ -- 0
call.type$ -- 1
change.case$ -- 0
chr.to.int$ -- 42
cite$ -- 0
duplicate$ -- 11
empty$ -- 104
format.name$ -- 0
if$ -- 325
int.to.chr$ -- 0
int.to.str$ -- 0
missing$ -- 0
newline$ -- 20
num.names$ -- 0
pop$ -- 47
preamble$ -- 1
purify$ -- 0
quote$ -- 0
skip$ -- 78
stack$ -- 0
substring$ -- 154
swap$ -- 1
text.length$ -- 20
text.prefix$ -- 0
top$ -- 1
type$ -- 22
warning$ -- 0
while$ -- 64
width$ -- 0
write$ -- 20

03_report/Tex/ass7.log

deleted100644 → 0
+0 −1078

File deleted.

Preview size limit exceeded, changes collapsed.

Loading