|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbodhidharma.utilities.LargeProgressBarTaskMonitor
bodhidharma.ProgressBarTaskTrainMonitor
public class ProgressBarTaskTrainMonitor
An implementation of the LargeProgressBarTaskMonitor
abstract class.
Trains ensembles of classifiers and provides information about training times.
Provides information to a LargeProgressBarDialog
object that is used
to keep it updated.
Training is started by calling the go
method. This will cause
the processing in ActualTask
to occur. ActualTask
will keep the fields described in this class' superclass updated, which can
be accessed using the methods in this class' superclass. The ActualTask
simply makes use of a ClassificationPanel's performHierarchicalTraining
method. The performAFoldOfTrainingAndClassification method of the
ClassificationPanel can also be used to perform multiple folds.
The setProgressDialog
method of an object of this class
must be called externally to cancel training.
The startTopTask, startMiddleTask, startBottomTask, setBottomProgressValue,
and markTaskComplete
methods are called during training to keep
an object of this class updated.
The isTrainingTimesAvailable, getMiddleTaskDurations, getBottomTaskDurations
and
getOverallTaskTime
methods can be used after training to gain information about training times.
Note that the top, middle and bottom tasks are hierarchal, in the sense that one the top task is complete when all middle sub-tasks are complete, and a middle sub-task is complete when all its bottom sub-tasks are complete.
LargeProgressBarTaskMonitor
,
ProgressBarDialog
,
SwingWorker
,
Recording
,
FeatureSet
,
RecordingsPanel
Field Summary |
---|
Constructor Summary | |
---|---|
ProgressBarTaskTrainMonitor(Recording[] all_eligible_recordings,
boolean[] training_key,
boolean report_training_results,
ClassificationPanel classification_doer,
boolean[][] multi_fold_training_keys,
int multi_fold_current_fold)
Basic constructor. |
Method Summary | |
---|---|
java.lang.String[][][] |
getBottomTaskDurations(boolean want_raw_seconds)
Returns the names and durations of each of the tasks appearing in the bottom progress text area. |
java.lang.String[][] |
getMiddleTaskDurations(boolean want_raw_seconds)
Returns the names and durations of each of the tasks appearing in the middle progress text area. |
java.lang.String |
getOverallTaskTime(boolean want_raw_seconds)
Returns the overall duration of the outer task. |
void |
go()
Called from classification_doer to set up a SwingWorker thread
that will initiate training. |
boolean |
isTrainingTimesAvailable()
Returns whether or training times are available. |
void |
markTaskComplete()
Called if the overall task is complete. |
void |
setBottomProgressValue(int progress_value)
Update the progress of the bottom progress bar. |
void |
setProgressDialog(LargeProgressBarDialog training_indicator)
Set the progress box so that it can be cancelled if an error occurs. |
void |
startBottomTask(int sub_tasks,
java.lang.String message)
Begin keeping track of a new bottom-level job with the given number of sub_tasks. |
void |
startMiddleTask(int sub_tasks,
java.lang.String message)
Begin keeping track of a new middle-level job with the given number of sub_tasks. |
void |
startTopTask(int sub_tasks,
java.lang.String message)
Begin keeping track of a new overall job with the given number of sub_tasks. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProgressBarTaskTrainMonitor(Recording[] all_eligible_recordings, boolean[] training_key, boolean report_training_results, ClassificationPanel classification_doer, boolean[][] multi_fold_training_keys, int multi_fold_current_fold)
all_eligible_recordings
- Recordings that will be broken up into training and testing groups.training_key
- Which recordings are to be used for testing and which are to be used for training. Indice corresponds to that of the all_eligible_recordings parameter. Value of true means use for training. A value of null means that breakdown is randomly selected.report_training_results
- Whether or not training errors (i.e. classifier convergence) are reported. Overrides preferences settings.classification_doer
- ClassificationPanel used to perform training.multi_fold_training_keys
- Keys to be used in further folds. Null if only one fold in all is used.multi_fold_current_fold
- The current fold being processed if there are multiple folds. Value is irrelevant if there is only one fold in all.Method Detail |
---|
public void go()
SwingWorker
thread
that will initiate training.
go
in class LargeProgressBarTaskMonitor
public void setProgressDialog(LargeProgressBarDialog training_indicator)
public void startTopTask(int sub_tasks, java.lang.String message)
public void startMiddleTask(int sub_tasks, java.lang.String message)
public void startBottomTask(int sub_tasks, java.lang.String message)
public void setBottomProgressValue(int progress_value)
public void markTaskComplete()
markTaskComplete
in class LargeProgressBarTaskMonitor
public boolean isTrainingTimesAvailable()
public java.lang.String[][] getMiddleTaskDurations(boolean want_raw_seconds)
want_raw_seconds
- Task times reported in seconds if true, as formatted string if false.public java.lang.String[][][] getBottomTaskDurations(boolean want_raw_seconds)
want_raw_seconds
- Task times reported in seconds if true, as formatted string if false.public java.lang.String getOverallTaskTime(boolean want_raw_seconds)
want_raw_seconds
- Time reported in seconds if true, as formatted string if false.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |