/src/keel/Algorithms/Subgroup_Discovery/SDMap/SDMap/Main.java

https://github.com/SCI2SUGR/KEEL · Java · 97 lines · 22 code · 11 blank · 64 comment · 2 complexity · 79d1f3bd3f5b29dc5967e25f1d4c1d3d MD5 · raw file

  1. /***********************************************************************
  2. This file is part of KEEL-software, the Data Mining tool for regression,
  3. classification, clustering, pattern mining and so on.
  4. Copyright (C) 2004-2010
  5. F. Herrera (herrera@decsai.ugr.es)
  6. L. Sánchez (luciano@uniovi.es)
  7. J. Alcalá-Fdez (jalcala@decsai.ugr.es)
  8. S. García (sglopez@ujaen.es)
  9. A. Fernández (alberto.fernandez@ujaen.es)
  10. J. Luengo (julianlm@decsai.ugr.es)
  11. This program is free software: you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation, either version 3 of the License, or
  14. (at your option) any later version.
  15. This program is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. GNU General Public License for more details.
  19. You should have received a copy of the GNU General Public License
  20. along with this program. If not, see http://www.gnu.org/licenses/
  21. **********************************************************************/
  22. package keel.Algorithms.Subgroup_Discovery.SDMap.SDMap;
  23. /**
  24. * <p> It reads the configuration file (data-set files and parameters) and launch the algorithm
  25. *
  26. * @author Written by Alberto Fernandez (University of Granada) 01/02/2006
  27. * @author Modified by Nicola Flugy Papa (Politecnico di Milano) 24/03/2009
  28. * @author Modified by Cristobal J. Carmona (University of Jaen) 10/07/2010
  29. * @version 1.0
  30. * @since JDK1.6
  31. * </p>
  32. */
  33. public class Main {
  34. private parseParameters parameters;
  35. /**
  36. * <p>
  37. * Default Constructor
  38. * </p>
  39. */
  40. public Main() {
  41. }
  42. /**
  43. * <p>
  44. * It launches the algorithm
  45. * </p>
  46. * @param confFile String it is the filename of the configuration file.
  47. */
  48. private void execute(String confFile) {
  49. parameters = new parseParameters();
  50. parameters.parseConfigurationFile(confFile);
  51. FPgrowth method = new FPgrowth(parameters);
  52. if(!method.isContinuous())
  53. method.execute();
  54. else System.out.println("\nThe dataset has continuous variable and it cannot be executed.\nAlgorithm finished");
  55. }
  56. /**
  57. * <p>
  58. * Main Program
  59. * </p>
  60. * <p>
  61. * <em>algorith = &lt;algorithm name></em><br/>
  62. * <em>inputData = "&lt;training file&gt;" "&lt;test file&gt;"</em><br/>
  63. * <em>outputData = "&lt;training file&gt;" "&lt;test file&gt;" "&lt;rule file&gt;" "&lt;measure file&gt;"</em><br/>
  64. * <br/>
  65. * <em>&lt;MinimumSupport&gt; = &lt;value1&gt;</em><br/>
  66. * <em>&lt;MinimumConfidence&gt; = &lt;value2&gt;</em><br/>
  67. * <em>&lt;RulesReturn&gt; = &lt;value3&gt;</em><br/>
  68. * </p>
  69. * @param args It contains the name of the configuration file
  70. */
  71. public static void main(String args[]) {
  72. Main program = new Main();
  73. StopWatch sw = new StopWatch();
  74. sw.start();
  75. program.execute(args[0]);
  76. sw.stop();
  77. sw.print();
  78. }
  79. }