Merge branch 'master' of github.com:MISP/misp-training

changes-actionable
Alexandre Dulaunoy 2019-10-21 13:52:29 +02:00
commit 44da6fec62
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 27 additions and 0 deletions

View File

@ -315,6 +315,33 @@
\end{lstlisting} \end{lstlisting}
\end{frame} \end{frame}
\lstset{language=PHP}
\begin{frame}[fragile]
\frametitle{Creating a new decay algorithm}
\lstset{basicstyle=\scriptsize}
\begin{lstlisting}
<?php
include_once 'Base.php';
class Polynomial extends DecayingModelBase
{
public const DESCRIPTION = 'The description of your new decaying algorithm';
public function computeScore($model, $attribute, $base_score, $elapsed_time)
{
// algorithm returning a numerical score
}
public function isDecayed($model, $attribute, $score)
{
// algorithm returning a boolean stating
// if the attribute is expired or not
}
}
?>
\end{lstlisting}
\end{frame}
\begin{frame} \begin{frame}
\frametitle{Decaying Models 2.0} \frametitle{Decaying Models 2.0}
\begin{itemize} \begin{itemize}