Weka is a library of machine learning algorithms for data mining tasks (data mining). It also includes a powerful graphical environment useful. The idea is that we must choose an algorithm, train, save the model generated from this training and use it to classify the data we want.
- Training: Once chosen the algorithm (in our case we use a decision tree
- ) model created by training the tree with the training data:
- java-Xmx [MEGABYTES_DE_MEM_PARA_LA_TAREA] M-cp [PATH_A_weka.jar] [ALGORITMO_DE_APRENDIZAJE + PARAMETERS]-t [FICHERO_ENTRENAMIENTO]-d [FICHERO_DONDE_SE_GUARDA_EL_MODELO]
For example: java-
Xmx1024M-cp / opt/weka-3-4-9/weka.jar weka.classifiers.trees.J48 -C 0.25-M 2-t-d rweka.model
rweka.arff
- Rating: With the model generated in the previous step for sorting data and execute:
java-Xmx [MEGABYTES_DE_MEM_PARA_LA_TAREA] M -cp [PATH_A_weka.jar] [ALGORITMO_DE_APRENDIZAJE]-l [FICHERO_CON_EL_MODELO]-T [FICHERO_A_CLASIFICAR]-p 0
In my case: - java-Xmx [MEGABYTES_DE_MEM_PARA_LA_TAREA] M-cp [PATH_A_weka.jar] [ALGORITMO_DE_APRENDIZAJE + PARAMETERS]-t [FICHERO_ENTRENAMIENTO]-d [FICHERO_DONDE_SE_GUARDA_EL_MODELO]
- Xmx1024M-java-cp / opt/weka-3-4-9/weka . jar weka.classifiers.trees.J48 Rweka.model-T-l-p 0
weka.classifiers.trees.J48
rweka.arff
This step will return to the standard output the classification of each element of the file in a line with the number of this element first, followed by the class assigned algorithm and additional information:
[NÚMERO_ELEMENTO] [CLASE_ASIGNADA] [CONFIANZA_EN_LA_RESPUESTA] [CLASE_REAL] Notes:
0 comments:
Post a Comment