public class CSV
extends java.lang.Object
Constructor and Description |
---|
CSV() |
Modifier and Type | Method and Description |
---|---|
static void |
afegirIndividu(Individual ind,
java.lang.String path)
Guarda un individu al final d'una població existent guardada en un fitxer
en format '.csv' (Coma Separated Values).
|
static void |
guardaAggregatedResults(aggregatedNumericResults anr,
java.lang.String desti) |
static void |
guardaPesosAtributs(Population train,
int cicle,
java.lang.String desti) |
static void |
guardarClassificacio(ClassificacioParametres c,
java.lang.String path)
Guarda una ClassificacioParametres
|
static void |
guardarClassificacio2(ClassificacioParametres classificacio,
java.lang.String path)
Guarda una ClassificacioParametres en un format una mica diferent que el metode guardarClassificacio()
|
static void |
guardarClassificacioSeleccio(ClassificacioParametres c,
SeleccioIndividus s,
java.lang.String path)
Guarda una ClassificacioParametres
|
static void |
guardarCoeficientVariancia(ModelEstadistic ME,
java.lang.String desti) |
static void |
guardarConfusio(Confusio mat,
java.lang.String path)
Guarda una matriu de confusio
|
static void |
guardarConfusioBinaria(ConfusioBinaria mat,
java.lang.String path)
Guarda una ConfusioBinaria.
|
static void |
guardarConfusioBinaritzada(ConfusioBinaritzada mats,
java.lang.String path)
Guarda una ConfusioBinaritzada
|
static void |
guardarDistancies(MatriuDistancies distancies,
java.lang.String path)
Guarda la matriu en un fitxer *.csv.
|
static void |
guardarDistanciesSeleccions(MatriuDistancies distancies,
SeleccioIndividus seleccio,
java.lang.String path) |
static void |
guardarDistanciesVectors(MatriuDistancies distancies,
java.lang.String path)
Guarda la matriu en un fitxer *.csv separant els vectors de la matriu en files
La Matriu de Distancies no estara ordenada.
|
static void |
guardaResAgentsIPesos(Classificacio[] classificacioAgents,
java.lang.Object[] reals,
java.math.BigDecimal[][] pesos,
Population inds,
java.lang.String desti)
Emagatzema un fitxer amb els resultats independents de cada Agent.
|
static void |
guardarMatriu(Matriu m,
java.lang.String path)
Guarda la matriu en un format CSV
|
static void |
guardarPoblacio(Population p,
java.lang.String path)
Guarda una poblacio en un fitxer en format '.csv' (Coma Separated Values).
|
static void |
guardarSeleccio(SeleccioIndividus s,
java.lang.String path)
Guarda les Seleccions d'una població
|
static void |
guardarSeleccions(SeleccioIndividus seleccio,
java.lang.String path) |
static AgentResults |
llegirAgentResults(java.lang.String path)
Llegeix un AgentResults
|
static ClassificacioParametres |
llegirClassificacio(java.lang.String path)
Llegeix una ClassificacioParametres
|
static java.lang.String |
llegirColumnaResultatQuery(java.lang.String path)
Llegeix un arxiu resultat en estructura de matriu i retorna la columna de
resultats de l'últim individu (cas de les querys) en forma d'String
|
static Confusio |
llegirConfusio(java.lang.String path)
Llegeix una Confusio
|
static ConfusioBinaria |
llegirConfusioBinaria(java.lang.String path)
Llegeix una ConfusioBinaria
|
static ConfusioBinaritzada |
llegirConfusioBinaritzada(java.lang.String path)
Llegeix una ConfusioBinaritzada
|
static MatriuDistancies |
llegirDistancies(java.lang.String path)
Carrega una Matriu de Distancies des d'un fitxer *.csv.
|
static MatriuDistancies |
llegirDistanciesVectors(java.lang.String path)
No implementat
|
static java.lang.String |
llegirFilaResultatQuery(java.lang.String path)
Llegeix un arxiu resultat en estructura de matriu i retorna la filera de
resultats de l'últim individu (cas de les querys) en forma d'String
|
static Matriu |
llegirMatriu(java.lang.String path)
Llegeix una Matriu
|
static Attribute[] |
llegirPesosAtributs(java.lang.String path) |
static Population |
llegirPoblacio(java.lang.String path)
Carrega una poblacio emagatzemada en un fitxer em format '.csv' (Coma Separated Values).
|
static java.lang.String |
llegirResultatQuery(java.lang.String path)
Llegeix un arxiu resultat en estructura de matriu i retorna el resultat
de l'últim individu (cas de les querys) en forma d'String
|
static void |
substituirUltimIndividu(Individual ind,
java.lang.String path)
Guarda un individu al final d'una població existent guardada en un fitxer
en format '.csv' (Coma Separated Values).
|
public static void guardarConfusioBinaria(ConfusioBinaria mat, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
mat
- matriu a guardarpath
- ruta de d'arxiu a crearjava.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException
- Pre:: L'arxiu 'path' no existeixpublic static void guardarConfusioBinaritzada(ConfusioBinaritzada mats, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
mats
- ConfusioBinaritzasa a guardarpath
- Ruta de l'arxiujava.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException
- Pre:: l'arxiu 'path' no existeixpublic static void guardarConfusio(Confusio mat, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
mat
- matriu a guardarpath
- ruta de l'arxiu a guardarjava.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException
- Pre:: L'arxiu 'path' no existeixpublic static void guardarClassificacio(ClassificacioParametres c, java.lang.String path) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
c
- ClassificacioParametres a guardarpath
- ruta de l'arxiu a guardarjava.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
- Pre:: L'arxiu 'path' no existeixpublic static void guardarClassificacio2(ClassificacioParametres classificacio, java.lang.String path) throws java.io.IOException
classificacio
- ClassificacioParametres a guardarpath
- ruta de l'arxiu a guardarjava.io.IOException
- Pre:: L'arxiu 'path' no existeixpublic static void guardarPoblacio(Population p, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
path
- String que indica el path del fitxer on es guardara la poblacio.java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
- Pre:: L'arxiu 'path' no existeixpublic static void afegirIndividu(Individual ind, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException, FileFormatException
path
- String que indica el path del fitxer on es guardara la poblacio.java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
- Pre:: L'arxiu 'path' no existeixFileFormatException
public static void substituirUltimIndividu(Individual ind, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException, FileFormatException
path
- String que indica el path del fitxer on es guardara la poblacio.java.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
- Pre:: L'arxiu 'path' no existeixFileFormatException
public static void guardarDistancies(MatriuDistancies distancies, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
distancies
- Matriu a guardarpath
- Localitzacio on es guardara el fitxer.java.io.IOException
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
- Pre:: L'arxiu 'path' no existeixpublic static void guardarDistanciesVectors(MatriuDistancies distancies, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
distancies
- Matriu a guardarpath
- Localitzacio on es guardara el fitxer.java.io.IOException
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
- Pre:: L'arxiu 'path' no existeixpublic static void guardarSeleccions(SeleccioIndividus seleccio, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException
public static void guardarDistanciesSeleccions(MatriuDistancies distancies, SeleccioIndividus seleccio, java.lang.String path) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException
public static void guardaResAgentsIPesos(Classificacio[] classificacioAgents, java.lang.Object[] reals, java.math.BigDecimal[][] pesos, Population inds, java.lang.String desti) throws java.io.IOException
classificacioAgents
- Classificacio dels resultats dels Agentsreals
- Classificacio real de cadascun dels individus de 'inds'pesos
- Pesos dels resultats dels Agents.inds
- Population amb els individus.desti
- Path del fitxer on es guardara el fitxer.java.io.IOException
- Pre:: L'arxiu 'desti' no existeixpublic static void guardarMatriu(Matriu m, java.lang.String path) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
m
- matriu a guardarpath
- ruta del fitxer a guardar
Pre:: L'arxiu 'path' no existeixjava.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
public static ConfusioBinaria llegirConfusioBinaria(java.lang.String path) throws java.io.IOException
path
- ruta de l'arxiu a llegirjava.io.IOException
- Pre:: L'arxiu 'path' existeix i has un format correctepublic static ConfusioBinaritzada llegirConfusioBinaritzada(java.lang.String path) throws java.io.IOException, FileFormatException
path
- ruta de l'arxiu a llegirjava.io.IOException
FileFormatException
- Pre:: L'arxiu 'path' existeix i has un format correctepublic static Matriu llegirMatriu(java.lang.String path) throws java.io.IOException
path
- ruta de l'arxiu a llegirjava.io.IOException
- Pre:: L'arxiu 'path' existeix i has un format correctepublic static Confusio llegirConfusio(java.lang.String path) throws java.io.IOException
path
- ruta de l'arxiu a llegirjava.io.IOException
- Pre:: L'arxiu 'path' existeix i has un format correctepublic static ClassificacioParametres llegirClassificacio(java.lang.String path) throws java.io.IOException
path
- ruta de l'arxiu a llegirjava.io.IOException
- Pre:: L'arxiu 'path' existeix i has un format correctepublic static java.lang.String llegirResultatQuery(java.lang.String path) throws java.io.IOException
path
- ruta de l'arxiu a llegirjava.io.IOException
- Pre:: L'arxiu 'path' existeix i has un format correctepublic static java.lang.String llegirFilaResultatQuery(java.lang.String path) throws java.io.IOException
path
- ruta de l'arxiu a llegirjava.io.IOException
- Pre:: L'arxiu 'path' existeix i has un format correctepublic static java.lang.String llegirColumnaResultatQuery(java.lang.String path) throws java.io.IOException
path
- ruta de l'arxiu a llegirjava.io.IOException
- Pre:: L'arxiu 'path' existeix i has un format correctepublic static Population llegirPoblacio(java.lang.String path) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException, FileFormatException
path
- String que indica el path del fitxer amb la Population a carregar.java.io.IOException
java.io.FileFormatException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
- Pre:: L'arxiu 'path' existeix i has un format correcteFileFormatException
public static AgentResults llegirAgentResults(java.lang.String path) throws java.io.IOException, FileFormatException
path
- ruta de l'arxiu a llegirjava.io.IOException
FileFormatException
- Pre:: L'arxiu 'path' existeix i has un format correctepublic static MatriuDistancies llegirDistancies(java.lang.String path) throws java.io.IOException, FileFormatException
path
- Path del fitxer que has la Matriu de Distancies.java.io.IOException
FileFormatException
public static MatriuDistancies llegirDistanciesVectors(java.lang.String path) throws java.io.IOException, FileFormatException
path
- java.io.IOException
FileFormatException
public static void guardarCoeficientVariancia(ModelEstadistic ME, java.lang.String desti) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException
public static void guardaAggregatedResults(aggregatedNumericResults anr, java.lang.String desti) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.FileNotFoundException, java.io.IOException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException
public static void guardaPesosAtributs(Population train, int cicle, java.lang.String desti) throws java.io.UnsupportedEncodingException, java.io.FileNotFoundException, java.io.IOException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException
public static Attribute[] llegirPesosAtributs(java.lang.String path) throws java.io.IOException
java.io.IOException
public static void guardarClassificacioSeleccio(ClassificacioParametres c, SeleccioIndividus s, java.lang.String path) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
c
- ClassificacioParametres a guardars
- path
- ruta de l'arxiu a guardarjava.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
- Pre:: L'arxiu 'path' no existeixpublic static void guardarSeleccio(SeleccioIndividus s, java.lang.String path) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException, java.io.IOException
s
- c
- ClassificacioParametres a guardarpath
- ruta de l'arxiu a guardarjava.io.FileNotFoundException
java.io.UnsupportedEncodingException
java.io.IOException
- Pre:: L'arxiu 'path' no existeix