Dependency_Diagram.png

Experimentation Library

The Feature Engineering Console relies heavily upon the

[[edu.byu.nlp.experimentation]]

package within the Statistical NLP library. The package provides a more-or-less abstract interface for analysis of identification and classification systems such as Spoken Language ID or Proper Noun Phrase Classification. Developers who wish to be able to use the FEC to inspect their system's performance should focus on implementing

edu.byu.nlp.experimentation.systems.ExperimentationSystem

by means of

edu.byu.nlp.experimentation.systems.[Identification|Classification]System

.

FEC Architecture

The Feature Engineering Console GUI application resides in the edu.byu.fec package and is constructed around two central classes: edu.byu.fec.FeatureEngineeringConsole and edu.byu.fec.experimentation.EngineeringEnvironment. FeatureEnineeringConsole is a singleton child of JFrame that constructs a Swing-based user interface and then invokes EngineeringEnvironment to discover implementors of

edu.byu.nlp.experimentation.systems.ExperimentationSystem

and then expose them to the user via the GUI.

class FeatureEngineeringConsole

An instance of FeatureEngineeringConsole contains two JTabbedPane's. One of these holds the main panels with which the user will interact. The second of these contains a graphical console that displays more detailed output received from the experimentation systems.

FeatureEngineeringConsole's main method first instantiates the FeatureEngineeringConsole singleton, then uses its

addTabWithHeader

method to add a SystemListPanel to the JTabbedPane. All future GUI operations then originate from either the ExperimentListPanel or the JMenuBar inside of the JFrame.

  • FeatureEngineeringConsole.getInstance().addTabWithHeader(JPanel panel, ...)

    : This is how you add a JPanel to a JTabbedPane. The method automatically handles creation of a separate tab header (the need for which is a major failing of this part of Swing, IMO). Options allow suppression of a close button, automatic activation of the tab upon creation, and adding to a JTabbedPane other than the default one contained in FeatureEngineeringConsole.

class EngineeringEnvironment

The EngineeringEnvironment class contains only static methods. A

static {...}

block performs runtime discovery of ExperimentationSystem's using the obscure but nonetheless standard

javax.imageio.spi.ServiceRegistry.lookupProviders

service discovery mechanism. EngineeringEnvironment also defines a thread pool:

private static ExecutorService execService = Executors.newSingleThreadExecutor();

that is used to schedule ExperimentationSystem experiment runs and other jobs at runtime. ExperimentationSystem implementors do this using

EngineeringEnvironment.queueJob(Job job)

. At this time the thread pool contains only one thread to simplify locking issues. However, in the future it is hoped that the Lock mechanism within edu.byu.nlp.experimentation.jobs.Job will facilitate the use of multiple threads in parallel.

ExperimentationSystem Discovery

The method of initializing experimentation systems is a bit convoluted and requires several layers of indirection. I believe these layers are all justified, however. Here is an example of the discovery of the Language-ID system. The implication is that Language-ID-Experimentation-Module.jar is in FEC's runtime classpath so that it can be reached by the discovery mechanism: :EngineeringEnvironment's

static {...}

block ::

javax.imageio.spi.ServiceRegistry.lookupProviders

:::

META-INF/services/edu.byu.nlp.experimentation.systems.ExperimentationSystem

(a file within Language-ID-Experimentation-Module.jar which contains one line:

edu.byu.langid.experimentation.systems.SLIDSystemFacade

) ::::

new SLIDSystemFacade()

:::::

SLIDSystem.getInstance()

(delegation)

Panels

  • JPanel
    • AbstractResultViewerPanel
      • CostComponentMatrix
      • DetcurveChartPanel
      • TrialAnalysisPanel
    • SystemList
      • System
        • ExperimentList
          • Experiment
        • RegressionTestList
        • FeatureTemplateList
        • QuantizationList
        • ExperimentRunList
        • [Categorizations]
    • JobQueuePanel
    • EditorPanel
    • FileFeatureWeightPanel (broken?)
    • ScriptingPanel (incomplete)

Models

Other Data Structures

nlp-private/fec-design.txt · Last modified: 2015/04/22 21:01 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0