Uploaded image for project: 'OpenNLP'
  1. OpenNLP
  2. OPENNLP-759

Speed up GIS training by saving Executor in the GISTrainer

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: maxent-3.0.3
    • Fix Version/s: 1.7.0
    • Component/s: Machine Learning
    • Labels:

      Description

      In GISTrainer.nextIteration(double) an ExecutorService is created and shutdown. I don't see a reason to create a ExecutorService for each iteration.

      If you create the ExecutorService in the TrainModels(int, dataindexer, Prior, int, int) method you can save it as a field in GISTrainer or pass it as an argument to findParameters(int, double).

      To test it out, I made a MyGIS and MyGISTrainer classes with the fixes. There was a 5% speedup with 100 my dataset and 100 iterations of GIS.

      I would be happy to share the code with you. (I can not share my data though, sorry data-use agreements).

        Attachments

        1. GISTrainer.patch
          4 kB
          Daniel Russ

          Activity

            People

            • Assignee:
              joern Jörn Kottmann
              Reporter:
              druss Daniel Russ
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: