Module view.DataEditor

Dialog that allows the user to edit training and test data.

Functions

DataEditor.new (parent, self) Constructor.
DataEditor:add_maps (maps) Adds a list of maps to the editor.
DataEditor:create_model (num_input, num_output, data) Creates and populates the model.
DataEditor:render_cell (iter) Renders the values.
DataEditor:run (data, maps) Runs the editor.
DataEditor:toggle_map () Toggles the map on / off.
(private) DataEditor:add_action_buttons (box)
(private) DataEditor:add_column (pos, title, read_only) Adds a column to the view.
(private) DataEditor:add_response_buttons (box)
(private) DataEditor:add_row () Adds a row to the end of the model.
(private) DataEditor:build_gui (parent) Builds the interface.
(private) DataEditor:cell_edited (path, data) Handles a cell edition.
(private) DataEditor:clear_view () Clears the view, removing all columns and detaching the model.
(private) DataEditor:prepare (data, maps) Prepares the editor.
(private) DataEditor:remove_rows () Remove the selected rows.
(private) DataEditor:response () Dialog reimplementation for a greater control.
(private) DataEditor:save_data (num_input, num_output) Creates a new fann.Data based o the contents of the editor.
(private) DataEditor:selection_changed () Updates the buttons based on the current selection.
(private) DataEditor:selection_changed_cb () To allow a base class to override the selection changed.
(private) creation_callback (ud, ndata, num_in, num_out) Callback that handles the creation of the fann.Data.


Functions

DataEditor.new (parent, self)
Constructor.

Parameters

  • parent: Parent window
  • self: Permits inheritance (internal use)

Return value:

New instance of DataEditor
DataEditor:add_maps (maps)
Adds a list of maps to the editor.

Parameters

  • maps: Table (array) with the maps to be added
DataEditor:create_model (num_input, num_output, data)
Creates and populates the model.

Parameters

  • num_input: Number of input neurons
  • num_output: Number of output neurons
  • data: Data to populate the model (optional)
DataEditor:render_cell (iter)
Renders the values.

Parameters

  • iter:
DataEditor:run (data, maps)
Runs the editor.

Parameters

  • data: The data to be edited
  • maps: Visualization maps to be used

Return value:

The original data, if the user canceled, or the new one if the user confirmed the changes.
DataEditor:toggle_map ()
Toggles the map on / off.
(private) DataEditor:add_action_buttons (box)

Parameters

  • box:
(private) DataEditor:add_column (pos, title, read_only)
Adds a column to the view. Re-uses columns in the cache.

Parameters

  • pos:
  • title:
  • read_only:
(private) DataEditor:add_response_buttons (box)

Parameters

  • box:
(private) DataEditor:add_row ()
Adds a row to the end of the model.
(private) DataEditor:build_gui (parent)
Builds the interface.

Parameters

  • parent:
(private) DataEditor:cell_edited (path, data)
Handles a cell edition.

Parameters

  • path:
  • data:
(private) DataEditor:clear_view ()
Clears the view, removing all columns and detaching the model.
(private) DataEditor:prepare (data, maps)
Prepares the editor.

Parameters

  • data: fann.Data to be loaded
  • maps: Visualization maps to use
(private) DataEditor:remove_rows ()
Remove the selected rows.
(private) DataEditor:response ()
Dialog reimplementation for a greater control.
(private) DataEditor:save_data (num_input, num_output)
Creates a new fann.Data based o the contents of the editor.

Parameters

  • num_input: Number of input neurons
  • num_output: Number of output neurons

Return value:

New fann.Data created with the editor values
(private) DataEditor:selection_changed ()
Updates the buttons based on the current selection.
(private) DataEditor:selection_changed_cb ()
To allow a base class to override the selection changed.
(private) creation_callback (ud, ndata, num_in, num_out)
Callback that handles the creation of the fann.Data.

Parameters

  • ud:
  • ndata:
  • num_in:
  • num_out:

Valid XHTML 1.0!