Created
February 27, 2018 08:50
-
-
Save ABeltramo/c58e0ef852b6cee25d57103ef6646459 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\begin{algorithm} | |
\caption{ConcurrentGain - Le chiamate al calcolo dell'information gain vengono eseguite in parallelo utilizzando tutti i core disponibili.} | |
\label{alg:ID3_concurrentGain} | |
\begin{algorithmic}[1] | |
\Procedure{maxInformationGain}{$Dataset, Attributes, TargetAttributes$} | |
\Statex Calcola parallelamente l'attributo che meglio suddivide il dataset in input per classificare il target. | |
\State $Threads \gets $ [ ] \Comment{Creo un array di riferimenti ai Thread} | |
\ForAll{$Attribute$ in $Attributes$} | |
\If{$Attribute \not= TargetAttributes$} \Comment{Salto l'attributo Target} | |
\State $Threads[i] \gets concurrentGain(Attribute)$ | |
\EndIf | |
\EndFor | |
\State Attendi il completamento dei Threads | |
\State $MaxGain \gets maxGain(Threads)$ \Comment{Ricerca il massimo IG} | |
\State \Return $MaxGain$ | |
\EndProcedure | |
\end{algorithmic} | |
\end{algorithm} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment