".") && ($nometarefa<>"..")) { $tarefa=trim($nometarefa); $arquivo= $diretoriotarefas.$tarefa."/matrizindexada_".$tarefa.".txt"; $arqclusters=$diretoriotarefas.$tarefa."/clusters.txt"; $arqrotulos=$diretoriotarefas.$tarefa."/$tarefa."."rlabel"; // Geração de treino e teste por clustering $x= file_exists($arquivo); if (file_exists($arquivo) && file_exists($arqclusters)) { $clusters=file($arqclusters); $matrizindexada=file($arquivo); $rotulos = file($arqrotulos); // Elimina linha que contém informações de número de linhas e de colunas e redefine os indices unset($matrizindexada[0]); $matrizindexada=array_values($matrizindexada); $dirresults=$diretoriotarefas.$tarefa."/"; gerartreinoteste($matrizindexada, $clusters, $rotulos, $dirresults); // Destroi matrizes geradas unset($clusters); unset($matrizindexada); unset($rotulos); } } } ?>