Search in sources :

Example 1 with PersistenceView

use of edu.cmu.cs.hcii.cogtool.view.PersistenceView in project cogtool by cogtool.

the class SNIFACTDialog method onOK.

@Override
protected void onOK() {
    String task = responseBox.getText();
    int runs = numRunsSpinner.getSelection();
    int k = kValueSpinner.getSelection();
    String frameName = sortedFrames.get(startFrameCombo.getSelectionIndex()).getName();
    int[] targetInds = targetFrameList.getSelectionIndices();
    java.util.List<String> targets = new ArrayList<String>();
    for (int targetInd : targetInds) {
        targets.add(sortedFrames.get(targetInd).getName());
    }
    int algIndex = (algCombo == null) ? 0 : algCombo.getSelectionIndex();
    boolean add = (addToGroup == null) ? false : addToGroup.getSelection();
    parameters = new SNIFACTGroupParameters(task, runs, k, frameName, targets, algArray[algIndex], add);
    if (exportOnly.getSelection()) {
        SNIFACTPredictionAlgo.exportCTEModelFile = (new PersistenceView(parent)).selectFileDest("Exported CT-E Model", ".lisp");
    } else {
        SNIFACTPredictionAlgo.exportCTEModelFile = null;
    }
    super.onOK();
}
Also used : PersistenceView(edu.cmu.cs.hcii.cogtool.view.PersistenceView) ArrayList(java.util.ArrayList) SNIFACTGroupParameters(edu.cmu.cs.hcii.cogtool.model.SNIFACTPredictionAlgo.SNIFACTGroupParameters)

Aggregations

SNIFACTGroupParameters (edu.cmu.cs.hcii.cogtool.model.SNIFACTPredictionAlgo.SNIFACTGroupParameters)1 PersistenceView (edu.cmu.cs.hcii.cogtool.view.PersistenceView)1 ArrayList (java.util.ArrayList)1