Skip to content
Jonathan Sandoe edited this page Nov 26, 2018 · 1 revision

Xeno

Note: this is designed to be used in conjunction with arbor.

This plugin generates extraterrestrial creatures that may or may not have a particular malady. These maladies are associated with attributes (hair color, weight, number of tentacles, etc.) of the creatures. Your goal is to learn to diagnose the maladies, or, possibly, to identify which creatures are at risk.

There are three modes:

  • In "training" you get as many creatures as you like and are told whether they are sick or well.
  • In "one by one" you get one creature and tell the plugin whether you think it is sick or well. Then you're told if you are correct.
  • In "auto," you have used arbor to construct a classification tree to diagnose the creatures. You tell the plugin how many creatures; it generates them; and then sends their data to the tree for diagnosis. You are told which are correct and which are not.

In this initial version, you get or lose points depending on how good your diagnoses are. In this context, a false negative is worse than a false positive.

The purpose is to give students experience with the very idea of a tree so that when they use more sophisticated tools they will better understand what they are doing.

Communication with Arbor

When we ask for the tree to diagnose our new cases, a cascade of notifications has to occur. The problem is that this plugin cannot communicate directly with the arbor plugin. Therefore we use CODAP and the data itself to communicate.

Our creatures dataset is the key.

  1. When the user presses the button to create and automatically diagnose a set of cases, that calls xeno.autoDiagnose() (in xeno.js).
  2. That causes the cases to be created, with null values for fields diagnosis and analysis, and with a source field set to auto. These are emitted into creatures in CODAP.
  3. At this point, arbor has been waiting for new cases to be created in that same dataset (data context). If the new cases are marked as auto, the tree performs a diagnosis and updates the creatures records for diagnosis and analysis, setting the analysis value to TP, FP, etc., depending on whether the tree's diagnosis was correct.
  4. Then, this plugin — which is also watching for updates to creatures — retrieves the new cases and evaluates the results, updating the display to tell the user how many of the new diagnoses were correct. This happens in xenoConnect.processUpdateCaseNotification().

Files

  • xeno.html: the basic UI for this plugin, plus paths to the js.
  • xeno.css: style the html. Note that the layout uses grid.
  • xeno.js: defines the global xeno, acts as a controller, responds to control inputs, etc. Also manages everything that would ordinarily be in xeno.ui.js, but this is relatively simple, so everything is here. xeno.constants is in this file; that's where you will find version.
  • xeno.model.js: Generates new cases. Also has the algorithm for doing so based on the malady chosen; that's in the object xeno.model.maladies.
  • xeno.strings.js: Localization! If you import the url with ?lang=de, it will show up more or less in German.
  • xenoConnect.js: manages the connections with CODAP. Includes sending new creatures to the creatures table, including in response to diagnoses made in the tree.

Additional files

  • arborWorkshop.html: a web page with instructions for using this in combination with arbor. We have "imported" this page into documents for workshop use.
  • arborWorkshop.css: styling for that web page.
Clone this wiki locally