axa_assignment/preprocessing.html
2021-02-13 21:04:59 +01:00

156 lines
No EOL
86 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width" />
<title>⚡ Pluto.jl ⚡</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.12.20/frontend/editor.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.12.20/frontend/treeview.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fonsp/Pluto.jl@0.12.20/frontend/hide-ui.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/codemirror@5.58.1/lib/codemirror.min.css" type="text/css" />
<style id="MJX-SVG-styles">
mjx-container[jax="SVG"] {
direction: ltr;
}
mjx-container[jax="SVG"] > svg {
overflow: visible;
}
mjx-container[jax="SVG"] > svg a {
fill: blue;
stroke: blue;
}
mjx-assistive-mml {
position: absolute !important;
top: 0px;
left: 0px;
clip: rect(1px, 1px, 1px, 1px);
padding: 1px 0px 0px 0px !important;
border: 0px !important;
display: block !important;
width: auto !important;
overflow: hidden !important;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
mjx-assistive-mml[display="block"] {
width: 100% !important;
}
mjx-container[jax="SVG"][display="true"] {
display: block;
text-align: center;
margin: 1em 0;
}
mjx-container[jax="SVG"][display="true"][width="full"] {
display: flex;
}
mjx-container[jax="SVG"][justify="left"] {
text-align: left;
}
mjx-container[jax="SVG"][justify="right"] {
text-align: right;
}
g[data-mml-node="merror"] > g {
fill: red;
stroke: red;
}
g[data-mml-node="merror"] > rect[data-background] {
fill: yellow;
stroke: none;
}
g[data-mml-node="mtable"] > line[data-line] {
stroke-width: 70px;
fill: none;
}
g[data-mml-node="mtable"] > rect[data-frame] {
stroke-width: 70px;
fill: none;
}
g[data-mml-node="mtable"] > .mjx-dashed {
stroke-dasharray: 140;
}
g[data-mml-node="mtable"] > .mjx-dotted {
stroke-linecap: round;
stroke-dasharray: 0,140;
}
g[data-mml-node="mtable"] > g > svg {
overflow: visible;
}
[jax="SVG"] mjx-tool {
display: inline-block;
position: relative;
width: 0;
height: 0;
}
[jax="SVG"] mjx-tool > mjx-tip {
position: absolute;
top: 0;
left: 0;
}
mjx-tool > mjx-tip {
display: inline-block;
padding: .2em;
border: 1px solid #888;
font-size: 70%;
background-color: #F8F8F8;
color: black;
box-shadow: 2px 2px 5px #AAAAAA;
}
g[data-mml-node="maction"][data-toggle] {
cursor: pointer;
}
mjx-status {
display: block;
position: fixed;
left: 1em;
bottom: 1em;
min-width: 25%;
padding: .2em .4em;
border: 1px solid #888;
font-size: 90%;
background-color: #F8F8F8;
color: black;
}
foreignObject[data-mjx-xml] {
font-family: initial;
line-height: normal;
overflow: visible;
}
.MathJax path {
stroke-width: 3;
}
</style>
</head>
<body>
<main><preamble><button class="runallchanged" title="Save and run all changed cells"><span></span></button></preamble><pluto-notebook id="9a1abc2e-6e2f-11eb-183b-65b91a2e9b36"><pluto-cell class="" id="21895968-6c5d-11eb-1800-cd0f921c6d83"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y rich_output " mime="text/plain"><assignee></assignee><div></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>5</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">begin</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">using</span> <span class="cm-variable">DataFrames</span>, <span class="cm-variable">CSV</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">using</span> <span class="cm-variable">Dates</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">using</span> <span class="cm-variable">Flux</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 83px;"></div><div class="CodeMirror-gutters" style="height: 117px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">31.8&nbsp;s</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="326f6ec0-6c5d-11eb-105a-ff2f251973c2"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>splitLabel (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>1</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-def">splitLabel</span>(<span class="cm-variable">label</span>) <span class="cm-operator">=</span> <span class="cm-builtin">split</span>(<span class="cm-variable">label</span>, <span class="cm-string">" "</span>)[<span class="cm-number">1</span>]</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 23px;"></div><div class="CodeMirror-gutters" style="height: 57px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">27.7&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="3771c65c-6c5d-11eb-24d7-39b38b5bfde6"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>onehot_df (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>7</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">function</span> <span class="cm-def">onehot_df</span>(<span class="cm-variable">training</span><span class="cm-builtin">::DataFrame</span>, <span class="cm-variable">key</span><span class="cm-builtin">::String</span>, <span class="cm-variable">labels</span><span class="cm-builtin">::Array</span>, <span class="cm-variable">insert</span><span class="cm-builtin">::Bool</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">if</span> <span class="cm-operator">!</span><span class="cm-variable">insert</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">return</span> <span class="cm-builtin">select</span>(<span class="cm-variable">training</span>, <span class="cm-builtin">Not</span>(<span class="cm-variable">key</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">oh_key</span> <span class="cm-operator">=</span> <span class="cm-variable">Flux</span><span class="cm-operator">.</span><span class="cm-builtin">onehotbatch</span>(<span class="cm-variable">training</span>[<span class="cm-operator">!</span>, <span class="cm-variable">key</span>], <span class="cm-variable">labels</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">return</span> <span class="cm-builtin">hcat</span>(<span class="cm-builtin">select</span>(<span class="cm-variable">training</span>, <span class="cm-builtin">Not</span>(<span class="cm-variable">key</span>)), <span class="cm-builtin">DataFrame</span>(<span class="cm-variable">oh_key</span><span class="cm-operator">'</span>, (<span class="cm-variable">key</span>[<span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-number">4</span>]<span class="cm-operator">*</span><span class="cm-string">"_"</span>) <span class="cm-operator">.*</span> <span class="cm-variable">splitLabel</span><span class="cm-operator">.</span>(<span class="cm-variable">labels</span>)))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 128px;"></div><div class="CodeMirror-gutters" style="height: 162px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">47.1&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="3b016552-6c5d-11eb-0818-096189d166bb"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>dateConv (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>1</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-def">dateConv</span>(<span class="cm-variable">d</span>) <span class="cm-operator">=</span> <span class="cm-variable">Dates</span><span class="cm-operator">.</span><span class="cm-builtin">DateTime</span>(<span class="cm-variable">d</span>, <span class="cm-string">"yyyy-mm-dd HH:MM:SS"</span>)</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 23px;"></div><div class="CodeMirror-gutters" style="height: 57px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">26.7&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="49b50c02-6c5d-11eb-2c20-15a0ffa11887"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>convertDay (generic function with 1 method)</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>1</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-def">convertDay</span>(<span class="cm-variable">array</span>) <span class="cm-operator">=</span> <span class="cm-variable">Dates</span><span class="cm-operator">.</span><span class="cm-variable">value</span><span class="cm-operator">.</span>(<span class="cm-variable">convert</span><span class="cm-operator">.</span>(<span class="cm-variable">Dates</span><span class="cm-operator">.</span><span class="cm-variable">Day</span>, <span class="cm-variable">round</span><span class="cm-operator">.</span>(<span class="cm-variable">array</span>, <span class="cm-variable">Dates</span><span class="cm-operator">.</span><span class="cm-variable">Day</span>)))</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 23px;"></div><div class="CodeMirror-gutters" style="height: 57px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">145&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="4d686d12-6c5d-11eb-0f48-f9ad13682cd2"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="text/plain"><assignee></assignee><div><pre><code>"ytraining_SC_GGP_AXA_FR.csv"</code></pre></div></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>65</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation" style=""><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">begin</span> </span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">2</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">filename_training</span> <span class="cm-operator">=</span> <span class="cm-string">"training_SC_GGP_AXA_FR.csv"</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">3</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">filename_scoring</span> <span class="cm-operator">=</span> <span class="cm-string">"scoring_SC_GGP_AXA_FR.csv"</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">4</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">training</span> <span class="cm-operator">=</span> <span class="cm-builtin">DataFrame</span>(<span class="cm-variable">CSV</span><span class="cm-operator">.</span><span class="cm-builtin">File</span>(<span class="cm-variable">filename_training</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">5</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">scoring</span> <span class="cm-operator">=</span> <span class="cm-builtin">DataFrame</span>(<span class="cm-variable">CSV</span><span class="cm-operator">.</span><span class="cm-builtin">File</span>(<span class="cm-variable">filename_scoring</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">6</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">7</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-comment"># Date conversion</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">8</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-comment"># Missing</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">9</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">today_</span> <span class="cm-operator">=</span> <span class="cm-variable">Dates</span><span class="cm-operator">.</span><span class="cm-builtin">now</span>()</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">10</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">today_string</span> <span class="cm-operator">=</span> <span class="cm-variable">Dates</span><span class="cm-operator">.</span><span class="cm-builtin">format</span>(<span class="cm-variable">today_</span>, <span class="cm-string">"yyyy-mm-dd HH:MM:SS"</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">11</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">replace!</span>(<span class="cm-variable">training</span><span class="cm-operator">.</span><span class="cm-variable">ouverture_dernier_sinistre</span>, <span class="cm-variable">missing</span> <span class="cm-operator">=&gt;</span> <span class="cm-variable">today_string</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">12</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">replace!</span>(<span class="cm-variable">scoring</span><span class="cm-operator">.</span><span class="cm-variable">ouverture_dernier_sinistre</span>, <span class="cm-variable">missing</span> <span class="cm-operator">=&gt;</span> <span class="cm-variable">today_string</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">13</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">replace!</span>(<span class="cm-variable">training</span><span class="cm-operator">.</span><span class="cm-variable">cloture_dernier_sinistre</span>, <span class="cm-variable">missing</span> <span class="cm-operator">=&gt;</span> <span class="cm-variable">today_string</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">14</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">replace!</span>(<span class="cm-variable">scoring</span><span class="cm-operator">.</span><span class="cm-variable">cloture_dernier_sinistre</span>, <span class="cm-variable">missing</span> <span class="cm-operator">=&gt;</span> <span class="cm-variable">today_string</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">15</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span cm-text=""></span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">16</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-comment"># Date conversion</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">17</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">date_keys</span> <span class="cm-operator">=</span> [<span class="cm-string">"debut_contrat"</span>, <span class="cm-string">"ouverture_dernier_sinistre"</span>, <span class="cm-string">"cloture_dernier_sinistre"</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">18</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">for</span> <span class="cm-variable">key</span> <span class="cm-operator">in</span> <span class="cm-variable">date_keys</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">19</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">training</span>[<span class="cm-operator">!</span>, <span class="cm-variable">key</span>] <span class="cm-operator">=</span> <span class="cm-variable">dateConv</span><span class="cm-operator">.</span>(<span class="cm-variable">training</span>[<span class="cm-operator">!</span>, <span class="cm-variable">key</span>])</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">20</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">scoring</span>[<span class="cm-operator">!</span>, <span class="cm-variable">key</span>] <span class="cm-operator">=</span> <span class="cm-variable">dateConv</span><span class="cm-operator">.</span>(<span class="cm-variable">scoring</span>[<span class="cm-operator">!</span>, <span class="cm-variable">key</span>])</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">21</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">22</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">23</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-comment"># Add duree</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">24</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">insertcols!</span>(<span class="cm-variable">training</span>, <span class="cm-string">"duree_contrat"</span> <span class="cm-operator">=&gt;</span> <span class="cm-builtin">convertDay</span>(<span class="cm-variable">today_</span> <span class="cm-operator">-</span> <span class="cm-variable">training</span><span class="cm-operator">.</span><span class="cm-variable">debut_contrat</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">25</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">insertcols!</span>(<span class="cm-variable">scoring</span>, <span class="cm-string">"duree_contrat"</span> <span class="cm-operator">=&gt;</span> <span class="cm-builtin">convertDay</span>(<span class="cm-variable">today_</span> <span class="cm-operator">-</span> <span class="cm-variable">scoring</span><span class="cm-operator">.</span><span class="cm-variable">debut_contrat</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">26</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">insertcols!</span>(<span class="cm-variable">training</span>, <span class="cm-string">"duree_dernier_sinistre"</span> <span class="cm-operator">=&gt;</span> <span class="cm-builtin">convertDay</span>(<span class="cm-variable">training</span><span class="cm-operator">.</span><span class="cm-variable">cloture_dernier_sinistre</span> <span class="cm-operator">-</span> <span class="cm-variable">training</span><span class="cm-operator">.</span><span class="cm-variable">ouverture_dernier_sinistre</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">27</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">insertcols!</span>(<span class="cm-variable">scoring</span>, <span class="cm-string">"duree_dernier_sinistre"</span> <span class="cm-operator">=&gt;</span> <span class="cm-builtin">convertDay</span>(<span class="cm-variable">scoring</span><span class="cm-operator">.</span><span class="cm-variable">cloture_dernier_sinistre</span> <span class="cm-operator">-</span> <span class="cm-variable">scoring</span><span class="cm-operator">.</span><span class="cm-variable">ouverture_dernier_sinistre</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">28</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">insertcols!</span>(<span class="cm-variable">training</span>, <span class="cm-string">"duree_zero_sinistre"</span> <span class="cm-operator">=&gt;</span> <span class="cm-builtin">convertDay</span>(<span class="cm-variable">today_</span> <span class="cm-operator">-</span> <span class="cm-variable">training</span><span class="cm-operator">.</span><span class="cm-variable">cloture_dernier_sinistre</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">29</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">insertcols!</span>(<span class="cm-variable">scoring</span>, <span class="cm-string">"duree_zero_sinistre"</span> <span class="cm-operator">=&gt;</span> <span class="cm-builtin">convertDay</span>(<span class="cm-variable">today_</span> <span class="cm-operator">-</span> <span class="cm-variable">scoring</span><span class="cm-operator">.</span><span class="cm-variable">cloture_dernier_sinistre</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">30</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">31</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-comment"># Remove dates</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">32</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">for</span> <span class="cm-variable">key</span> <span class="cm-operator">in</span> <span class="cm-variable">date_keys</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">33</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">select!</span>(<span class="cm-variable">training</span>, <span class="cm-builtin">Not</span>(<span class="cm-variable">key</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">34</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">select!</span>(<span class="cm-variable">scoring</span>, <span class="cm-builtin">Not</span>(<span class="cm-variable">key</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">35</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">36</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span cm-text=""></span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">37</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-comment"># One hot encode categorical</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">38</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">categorical_keys</span> <span class="cm-operator">=</span> [<span class="cm-string">"departement"</span>, <span class="cm-string">"categorie_socio_professionnelle"</span>, <span class="cm-string">"type_de_bien"</span>, <span class="cm-string">"statut"</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">39</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">insert_bools</span> <span class="cm-operator">=</span> [<span class="cm-builtin">true</span>, <span class="cm-builtin">true</span>, <span class="cm-builtin">true</span>, <span class="cm-builtin">true</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">40</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">for</span> <span class="cm-variable">i</span> <span class="cm-operator">in</span> <span class="cm-number">1</span><span class="cm-operator">:</span><span class="cm-number">4</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">41</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">key</span> <span class="cm-operator">=</span> <span class="cm-variable">categorical_keys</span>[<span class="cm-variable">i</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">42</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">insert</span> <span class="cm-operator">=</span> <span class="cm-variable">insert_bools</span>[<span class="cm-variable">i</span>]</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">43</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">labels</span> <span class="cm-operator">=</span> <span class="cm-builtin">sort</span>(<span class="cm-builtin">unique</span>(<span class="cm-variable">training</span>[<span class="cm-operator">!</span>, <span class="cm-variable">key</span>]))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">44</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">global</span> <span class="cm-variable">training</span> <span class="cm-operator">=</span> <span class="cm-builtin">onehot_df</span>(<span class="cm-variable">training</span>, <span class="cm-variable">key</span>, <span class="cm-variable">labels</span>, <span class="cm-variable">insert</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">45</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">global</span> <span class="cm-variable">scoring</span> <span class="cm-operator">=</span> <span class="cm-builtin">onehot_df</span>(<span class="cm-variable">scoring</span>, <span class="cm-variable">key</span>, <span class="cm-variable">labels</span>, <span class="cm-variable">insert</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">46</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-keyword">end</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">47</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span cm-text=""></span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">48</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-comment"># drop useless</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">49</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">select!</span>(<span class="cm-variable">training</span>, <span class="cm-builtin">Not</span>(<span class="cm-string">"index"</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">50</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-builtin">select!</span>(<span class="cm-variable">scoring</span>, <span class="cm-builtin">Not</span>(<span class="cm-string">"index"</span>))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">51</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span cm-text=""></span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">52</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">training</span> <span class="cm-operator">=</span> <span class="cm-variable">Float32</span><span class="cm-operator">.</span>(<span class="cm-variable">training</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">53</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">scoring</span> <span class="cm-operator">=</span> <span class="cm-variable">Float32</span><span class="cm-operator">.</span>(<span class="cm-variable">scoring</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">54</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span cm-text=""></span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">55</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-comment">#write to files</span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">56</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">Xscoring</span> <span class="cm-operator">=</span> <span class="cm-variable">Float32</span><span class="cm-operator">.</span>(<span class="cm-variable">scoring</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">57</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">CSV</span><span class="cm-operator">.</span><span class="cm-builtin">write</span>(<span class="cm-string">"x"</span><span class="cm-operator">*</span><span class="cm-variable">filename_scoring</span>, <span class="cm-variable">Xscoring</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">58</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span cm-text=""></span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">59</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">Xtraining</span> <span class="cm-operator">=</span> <span class="cm-variable">Float32</span><span class="cm-operator">.</span>(<span class="cm-builtin">select</span>(<span class="cm-variable">training</span>, <span class="cm-builtin">Not</span>(<span class="cm-string">"target"</span>)))</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">60</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">CSV</span><span class="cm-operator">.</span><span class="cm-builtin">write</span>(<span class="cm-string">"x"</span><span class="cm-operator">*</span><span class="cm-variable">filename_training</span>, <span class="cm-variable">Xtraining</span>)</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">61</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span cm-text=""></span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">62</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">Ytraining</span> <span class="cm-operator">=</span> <span class="cm-variable">Float32</span><span class="cm-operator">.</span>(<span class="cm-variable">training</span>[<span class="cm-operator">!</span>, <span class="cm-string">"target"</span>])</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">63</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-tab" role="presentation" cm-text=" "> </span><span class="cm-variable">CSV</span><span class="cm-operator">.</span><span class="cm-builtin">write</span>(<span class="cm-string">"y"</span><span class="cm-operator">*</span><span class="cm-variable">filename_training</span>, <span class="cm-builtin">DataFrame</span>(<span class="cm-variable">target</span><span class="cm-operator">=</span><span class="cm-variable">Ytraining</span>));</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">64</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span cm-text=""></span></span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">65</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-keyword">end</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 1103px;"></div><div class="CodeMirror-gutters" style="height: 1137px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">22.2&nbsp;s</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="9eb19f36-6c71-11eb-32da-394849a133bd"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="application/vnd.pluto.table+object"><assignee></assignee> <table class="pluto-table"><thead><tr class="schema-names"><th></th><th>age</th><th>surface</th><th>montant_assure</th><th>nb_sinistres_depuis_ouverture</th><th>cotisation_n-1</th><th>cotisation_n</th><th>target</th><th>duree_contrat</th><th><jlmore class="">more</jlmore></th></tr><tr class="schema-types"><th></th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th></th></tr></thead><tbody><tr><th>1</th><td><pre>46.0</pre></td><td><pre>65.3</pre></td><td><pre>15074.0</pre></td><td><pre>2.0</pre></td><td><pre>222.22</pre></td><td><pre>235.18</pre></td><td><pre>0.0</pre></td><td><pre>9142.0</pre></td><td></td></tr><tr><th>2</th><td><pre>30.0</pre></td><td><pre>61.96</pre></td><td><pre>29868.0</pre></td><td><pre>1.0</pre></td><td><pre>191.55</pre></td><td><pre>193.06</pre></td><td><pre>0.0</pre></td><td><pre>8462.0</pre></td><td></td></tr><tr><th>3</th><td><pre>26.0</pre></td><td><pre>121.87</pre></td><td><pre>23310.0</pre></td><td><pre>2.0</pre></td><td><pre>376.53</pre></td><td><pre>376.53</pre></td><td><pre>0.0</pre></td><td><pre>4822.0</pre></td><td></td></tr><tr><th>4</th><td><pre>37.0</pre></td><td><pre>73.85</pre></td><td><pre>16432.0</pre></td><td><pre>1.0</pre></td><td><pre>364.31</pre></td><td><pre>394.98</pre></td><td><pre>1.0</pre></td><td><pre>2555.0</pre></td><td></td></tr><tr><th>5</th><td><pre>29.0</pre></td><td><pre>64.34</pre></td><td><pre>15943.0</pre></td><td><pre>2.0</pre></td><td><pre>232.28</pre></td><td><pre>245.56</pre></td><td><pre>0.0</pre></td><td><pre>9494.0</pre></td><td></td></tr><tr><th>6</th><td><pre>22.0</pre></td><td><pre>96.2</pre></td><td><pre>18678.0</pre></td><td><pre>1.0</pre></td><td><pre>360.96</pre></td><td><pre>366.66</pre></td><td><pre>0.0</pre></td><td><pre>3020.0</pre></td><td></td></tr><tr><th>7</th><td><pre>15.0</pre></td><td><pre>57.73</pre></td><td><pre>28578.0</pre></td><td><pre>1.0</pre></td><td><pre>245.56</pre></td><td><pre>246.03</pre></td><td><pre>0.0</pre></td><td><pre>5970.0</pre></td><td></td></tr><tr><th>8</th><td><pre>31.0</pre></td><td><pre>87.58</pre></td><td><pre>32808.0</pre></td><td><pre>2.0</pre></td><td><pre>369.11</pre></td><td><pre>385.15</pre></td><td><pre>1.0</pre></td><td><pre>7659.0</pre></td><td></td></tr><tr><th>9</th><td><pre>36.0</pre></td><td><pre>104.94</pre></td><td><pre>16700.0</pre></td><td><pre>1.0</pre></td><td><pre>405.67</pre></td><td><pre>454.9</pre></td><td><pre>0.0</pre></td><td><pre>6247.0</pre></td><td></td></tr><tr><th>10</th><td><pre>55.0</pre></td><td><pre>76.59</pre></td><td><pre>22078.0</pre></td><td><pre>2.0</pre></td><td><pre>223.86</pre></td><td><pre>237.23</pre></td><td><pre>0.0</pre></td><td><pre>537.0</pre></td><td></td></tr><tr><td class="jlmore-td" colspan="999"><jlmore class="">more</jlmore></td></tr><tr><th>1000</th><td><pre>59.0</pre></td><td><pre>104.96</pre></td><td><pre>12097.0</pre></td><td><pre>1.0</pre></td><td><pre>340.64</pre></td><td><pre>342.78</pre></td><td><pre>0.0</pre></td><td><pre>8362.0</pre></td><td></td></tr></tbody></table></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>1</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-variable">training</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 23px;"></div><div class="CodeMirror-gutters" style="height: 57px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">978&nbsp;ns</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="a231b4a2-6c71-11eb-306b-cf574cf3d093"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="application/vnd.pluto.table+object"><assignee></assignee> <table class="pluto-table"><thead><tr class="schema-names"><th></th><th>age</th><th>surface</th><th>montant_assure</th><th>nb_sinistres_depuis_ouverture</th><th>cotisation_n-1</th><th>cotisation_n</th><th>duree_contrat</th><th>duree_dernier_sinistre</th><th><jlmore class="">more</jlmore></th></tr><tr class="schema-types"><th></th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th>Float32</th><th></th></tr></thead><tbody><tr><th>1</th><td><pre>19.0</pre></td><td><pre>158.35</pre></td><td><pre>45419.0</pre></td><td><pre>3.0</pre></td><td><pre>376.12</pre></td><td><pre>387.09</pre></td><td><pre>5603.0</pre></td><td><pre>100.0</pre></td><td></td></tr><tr><th>2</th><td><pre>49.0</pre></td><td><pre>125.06</pre></td><td><pre>13374.0</pre></td><td><pre>1.0</pre></td><td><pre>314.26</pre></td><td><pre>314.49</pre></td><td><pre>2502.0</pre></td><td><pre>10.0</pre></td><td></td></tr><tr><th>3</th><td><pre>30.0</pre></td><td><pre>87.29</pre></td><td><pre>17763.0</pre></td><td><pre>2.0</pre></td><td><pre>204.33</pre></td><td><pre>208.21</pre></td><td><pre>7768.0</pre></td><td><pre>1.0</pre></td><td></td></tr><tr><th>4</th><td><pre>62.0</pre></td><td><pre>69.58</pre></td><td><pre>24241.0</pre></td><td><pre>0.0</pre></td><td><pre>208.14</pre></td><td><pre>210.1</pre></td><td><pre>143.0</pre></td><td><pre>0.0</pre></td><td></td></tr><tr><th>5</th><td><pre>21.0</pre></td><td><pre>76.56</pre></td><td><pre>19501.0</pre></td><td><pre>2.0</pre></td><td><pre>201.64</pre></td><td><pre>210.3</pre></td><td><pre>7848.0</pre></td><td><pre>1.0</pre></td><td></td></tr><tr><th>6</th><td><pre>53.0</pre></td><td><pre>43.54</pre></td><td><pre>34634.0</pre></td><td><pre>1.0</pre></td><td><pre>216.32</pre></td><td><pre>223.41</pre></td><td><pre>7427.0</pre></td><td><pre>146.0</pre></td><td></td></tr><tr><th>7</th><td><pre>35.0</pre></td><td><pre>78.87</pre></td><td><pre>18030.0</pre></td><td><pre>1.0</pre></td><td><pre>205.07</pre></td><td><pre>208.38</pre></td><td><pre>1131.0</pre></td><td><pre>71.0</pre></td><td></td></tr><tr><th>8</th><td><pre>15.0</pre></td><td><pre>60.66</pre></td><td><pre>15889.0</pre></td><td><pre>1.0</pre></td><td><pre>247.31</pre></td><td><pre>247.67</pre></td><td><pre>2337.0</pre></td><td><pre>62.0</pre></td><td></td></tr><tr><th>9</th><td><pre>31.0</pre></td><td><pre>75.71</pre></td><td><pre>8595.0</pre></td><td><pre>2.0</pre></td><td><pre>220.18</pre></td><td><pre>227.6</pre></td><td><pre>3201.0</pre></td><td><pre>90.0</pre></td><td></td></tr><tr><th>10</th><td><pre>16.0</pre></td><td><pre>149.34</pre></td><td><pre>26247.0</pre></td><td><pre>1.0</pre></td><td><pre>406.03</pre></td><td><pre>421.68</pre></td><td><pre>2929.0</pre></td><td><pre>6.0</pre></td><td></td></tr><tr><td class="jlmore-td" colspan="999"><jlmore class="">more</jlmore></td></tr><tr><th>300</th><td><pre>27.0</pre></td><td><pre>90.26</pre></td><td><pre>24565.0</pre></td><td><pre>2.0</pre></td><td><pre>213.97</pre></td><td><pre>230.39</pre></td><td><pre>2599.0</pre></td><td><pre>119.0</pre></td><td></td></tr></tbody></table></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>1</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-variable">scoring</span></span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 23px;"></div><div class="CodeMirror-gutters" style="height: 57px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">1.4&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="97a6a438-6c72-11eb-3996-0f96b5765cfe"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="application/vnd.pluto.table+object"><assignee></assignee> <table class="pluto-table"><thead><tr class="schema-names"><th></th><th>variable</th><th>mean</th><th>min</th><th>median</th><th>max</th><th>nunique</th><th>nmissing</th><th>eltype</th></tr><tr class="schema-types"><th></th><th>Symbol</th><th>Float32</th><th>Float32</th><th>Float64</th><th>Float32</th><th>Nothing</th><th>Nothing</th><th>DataType</th></tr></thead><tbody><tr><th>1</th><td><pre>:age</pre></td><td><pre>42.198</pre></td><td><pre>15.0</pre></td><td><pre>42.0</pre></td><td><pre>94.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>2</th><td><pre>:surface</pre></td><td><pre>86.8634</pre></td><td><pre>31.27</pre></td><td><pre>80.605</pre></td><td><pre>179.78</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>3</th><td><pre>:montant_assure</pre></td><td><pre>22461.1</pre></td><td><pre>4478.0</pre></td><td><pre>21201.0</pre></td><td><pre>55852.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>4</th><td><pre>:nb_sinistres_depuis_ouverture</pre></td><td><pre>1.492</pre></td><td><pre>0.0</pre></td><td><pre>1.0</pre></td><td><pre>4.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>5</th><td><pre>Symbol("cotisation_n-1")</pre></td><td><pre>272.762</pre></td><td><pre>175.38</pre></td><td><pre>227.525</pre></td><td><pre>440.87</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>6</th><td><pre>:cotisation_n</pre></td><td><pre>286.047</pre></td><td><pre>181.36</pre></td><td><pre>240.705</pre></td><td><pre>510.49</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>7</th><td><pre>:target</pre></td><td><pre>0.17</pre></td><td><pre>0.0</pre></td><td><pre>0.0</pre></td><td><pre>1.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>8</th><td><pre>:duree_contrat</pre></td><td><pre>4885.7</pre></td><td><pre>51.0</pre></td><td><pre>4821.0</pre></td><td><pre>9528.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>9</th><td><pre>:duree_dernier_sinistre</pre></td><td><pre>40.023</pre></td><td><pre>0.0</pre></td><td><pre>29.0</pre></td><td><pre>202.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>10</th><td><pre>:duree_zero_sinistre</pre></td><td><pre>3446.45</pre></td><td><pre>0.0</pre></td><td><pre>3113.5</pre></td><td><pre>9431.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><td class="jlmore-td" colspan="999"><jlmore class="">more</jlmore></td></tr><tr><th>122</th><td><pre>:stat_Propriétaire</pre></td><td><pre>0.386</pre></td><td><pre>0.0</pre></td><td><pre>0.0</pre></td><td><pre>1.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr></tbody></table></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>1</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-builtin">describe</span>(<span class="cm-variable">training</span>)</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 23px;"></div><div class="CodeMirror-gutters" style="height: 57px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">1.3&nbsp;s</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell><pluto-cell class="" id="9da64908-6c72-11eb-256e-9f683ffde6bc"><pluto-shoulder draggable="true" title="Drag to move cell"><button class="foldcode" title="Show/hide code"><span></span></button></pluto-shoulder><pluto-trafficlight></pluto-trafficlight><button class="add_cell before" title="Add cell"><span></span></button><pluto-output class="scroll_y " mime="application/vnd.pluto.table+object"><assignee></assignee> <table class="pluto-table"><thead><tr class="schema-names"><th></th><th>variable</th><th>mean</th><th>min</th><th>median</th><th>max</th><th>nunique</th><th>nmissing</th><th>eltype</th></tr><tr class="schema-types"><th></th><th>Symbol</th><th>Float32</th><th>Float32</th><th>Float64</th><th>Float32</th><th>Nothing</th><th>Nothing</th><th>DataType</th></tr></thead><tbody><tr><th>1</th><td><pre>:age</pre></td><td><pre>42.59</pre></td><td><pre>15.0</pre></td><td><pre>43.0</pre></td><td><pre>86.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>2</th><td><pre>:surface</pre></td><td><pre>86.7048</pre></td><td><pre>29.36</pre></td><td><pre>78.53</pre></td><td><pre>169.56</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>3</th><td><pre>:montant_assure</pre></td><td><pre>22894.9</pre></td><td><pre>7217.0</pre></td><td><pre>20810.5</pre></td><td><pre>50948.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>4</th><td><pre>:nb_sinistres_depuis_ouverture</pre></td><td><pre>1.46667</pre></td><td><pre>0.0</pre></td><td><pre>1.0</pre></td><td><pre>5.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>5</th><td><pre>Symbol("cotisation_n-1")</pre></td><td><pre>274.989</pre></td><td><pre>172.47</pre></td><td><pre>227.59</pre></td><td><pre>450.56</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>6</th><td><pre>:cotisation_n</pre></td><td><pre>288.086</pre></td><td><pre>180.7</pre></td><td><pre>240.395</pre></td><td><pre>599.5</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>7</th><td><pre>:duree_contrat</pre></td><td><pre>4812.16</pre></td><td><pre>90.0</pre></td><td><pre>5103.0</pre></td><td><pre>9532.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>8</th><td><pre>:duree_dernier_sinistre</pre></td><td><pre>34.82</pre></td><td><pre>0.0</pre></td><td><pre>19.5</pre></td><td><pre>189.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>9</th><td><pre>:duree_zero_sinistre</pre></td><td><pre>3175.81</pre></td><td><pre>0.0</pre></td><td><pre>2568.5</pre></td><td><pre>9021.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><th>10</th><td><pre>:depa_01</pre></td><td><pre>0.01</pre></td><td><pre>0.0</pre></td><td><pre>0.0</pre></td><td><pre>1.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr><tr><td class="jlmore-td" colspan="999"><jlmore class="">more</jlmore></td></tr><tr><th>121</th><td><pre>:stat_Propriétaire</pre></td><td><pre>0.423333</pre></td><td><pre>0.0</pre></td><td><pre>0.0</pre></td><td><pre>1.0</pre></td><td><pre>nothing</pre></td><td><pre>nothing</pre></td><td><pre>Float32</pre></td></tr></tbody></table></pluto-output><pluto-input><button class="delete_cell" title="Delete cell"><span></span></button><div class="CodeMirror cm-s-default CodeMirror-wrap"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea style="position: absolute; bottom: -1em; padding: 0px; width: 1px; height: 1em; outline: currentcolor none medium;" autocorrect="off" autocapitalize="none" spellcheck="false" tabindex="0" wrap="off"></textarea></div><div class="CodeMirror-vscrollbar" tabindex="-1" cm-not-content="true"><div style="min-width: 1px; height: 0px;"></div></div><div class="CodeMirror-hscrollbar" tabindex="-1" cm-not-content="true"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-scrollbar-filler" cm-not-content="true"></div><div class="CodeMirror-gutter-filler" cm-not-content="true"></div><div class="CodeMirror-scroll" tabindex="-1" draggable="true"><div class="CodeMirror-sizer" style="margin-left: 30px; margin-bottom: -16px; border-right-width: 34px; min-height: 23px; padding-right: 0px; padding-bottom: 0px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines" role="presentation"><div style="position: relative; outline: currentcolor none medium;" role="presentation"><div class="CodeMirror-measure"><pre class="CodeMirror-line-like"><span>xxxxxxxxxx</span></pre><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>1</div></div></div><div class="CodeMirror-measure"></div><div style="position: relative; z-index: 1;"></div><div class="CodeMirror-cursors"><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 15px;">&nbsp;</div></div><div class="CodeMirror-code" role="presentation"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="left: -30px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 21px;">1</div></div><pre class=" CodeMirror-line " role="presentation"><span role="presentation"><span class="cm-builtin">describe</span>(<span class="cm-variable">scoring</span>)</span></pre></div></div></div></div></div></div><div style="position: absolute; height: 34px; width: 1px; border-bottom: 0px solid transparent; top: 23px;"></div><div class="CodeMirror-gutters" style="height: 57px; left: 0px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 29px;"></div></div></div></div></pluto-input><pluto-runarea><button class="runcell" title="Run"><span></span></button><span class="runtime">894&nbsp;μs</span></pluto-runarea><button class="add_cell after" title="Add cell"><span></span></button></pluto-cell></pluto-notebook><dropruler></dropruler></main>
<svg style="display: none;" id="MJX-SVG-global-cache"><defs></defs></svg>
</body>
</html>