Top Banner
Matrix Review Progress/Features Source: Workshop Notes, Matrix Sketches, Trello, GXT Grid examples, Ideas…
30

Matrix Review

Feb 24, 2016

Download

Documents

Milica Piletic

Matrix Review. Progress/Features Source: Workshop Notes, Matrix Sketches, Trello , GXT Grid examples, Ideas…. Progress/Requirements. Demo. http://128.196.105.79:8080/mr/. Progress/Requirements. ?. ?. Progress/Requirements. Control Mode: Numerical to specify unit? - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Matrix Review

Matrix Review

Progress/FeaturesSource: Workshop Notes, Matrix Sketches,

Trello, GXT Grid examples, Ideas…

Page 2: Matrix Review

Progress/Requirements

Page 3: Matrix Review

Demo

• http://128.196.105.79:8080/mr/

Page 4: Matrix Review

Progress/Requirements

?

?

Page 5: Matrix Review
Page 6: Matrix Review

• Control Mode: Numerical to specify unit?• Or extra feature to convert values between units?• How to store values in backend? Retain original e.g.

“3mm” “4 cm” before converting anything?

Progress/Requirements?

Page 7: Matrix Review

Progress/Requirements• Additional features:

– Filtering of character values (default: free text)– Control mode: Numerical, Categorical, Off

• Control mode controls filtering options: free text, checkbox, > < =– Commenting values, taxa, characters– Lock values, taxa, characters, grid– Coloring– Hovering values:– Hovering shows a “summary”

• matrix control cell• Taxa• character

– Frozen character row, taxa column– Drag and Drop move of taxa and characters

• Includes autoscroll when dragging next to boundaries of scrollable area

Character A of Organ B of Taxon C has value XColor red “not sure”Comment: “Can you take a look?”

Page 8: Matrix Review

Decisions made along the way

• No character – organ grouping but rather “name based”– Will make character reordering complicated

• Categorical control input box not to add new values: Possibly introduces noise. New values can be added by switching between modes

• No word wrap cells: Makes matrix less space efficient and values can be shown in their entirety in tooltip

• “Grouping grid” / “Filtering” / “Hiding” of taxa– Leverage taxonomic hierarchy: TODO

Page 9: Matrix Review

Feature Possiblities• Taxa ordering mode: Taxonomic hierarchy

– Taxa carry hierachical information and rank in model • A tree• Order taxa (rows) according to DFS of tree (+ Indentation?)• Color code taxon cells for ranks? (conflict with annotation coloring: Color depending on a mode?)

• Hierarchy view to manipulatehierachy for desired taxa order• Hierarchy allows to filter descendants

familygenusspeciesspeciesgenusspecies

Page 10: Matrix Review

Feature Possiblities• Taxa ordering mode: Taxonomic hierarchy

– Alterative: Try to marry table with tree– Expansion of tree node shows additional rows for the child nodes– Probably complex to implement

• Other ideas?

Page 11: Matrix Review

Feature Possiblities

• Switch between taxon order modes or a one-time-action– Complete manual ordering via Drag and Drop and

possibly a new ordering view– Alphabetical– Coverage– Hierachy

• E.g.– Rename a taxa in alphabetical mode: Is it moving or

staying until alphabetical order is triggered?

Page 12: Matrix Review

Feature Possiblities

• Analysis panel (e.g. to slide in from bottom)– Allows to edit matrix while “analyzing”– http://www.sencha.com/examples/#ExamplePlace

:aggregationgrid– http://www.sencha.com/examples/#ExamplePlace

:livegroupsummary– At some point: Diagrams, etc.– Compare open requirements shown previously

Page 13: Matrix Review

Feature Possiblities

• Row expander – http://www.sencha.com/examples/#ExamplePlace:rowex

pandergrid– Would this be a prefered way to show the description?– Configurable to not span over entire row? (description

not well readable)– DnD of values should be possible (Click in character

values table no longer reserved)

• Other options to display description if needed? – Cf. Matrix sketch

Page 14: Matrix Review

Feature Possiblities

• Preview step for entering controlled mode of a character– Numerical

• Specify unit• Range values?• Are there Min/Max allowed values?• …?

– Categorical• Overview of states currently in table: Can review by inspecting

examples where they appear• User can manipulate the list• Upon confirmation, possibly values in matrix are removed

Page 15: Matrix Review

Open Questions• Visualization

– Color code: Multiple aspects, how to do?– Aspects I can currently see

• Colored e.g. “Expert can you verify?”, • Colored e.g. “interesting”• Touched• Visited• Locked• Merged• Dirty• Commented• Rank• Control Mode• Taxon name• Character name• Organ

– Ways to incorporate information: • Cell Tooltip• Cell Color• Cell Background icon(s)• …?

Page 16: Matrix Review

Open Questions• Selection mode

– Cell vs. row: Click is now available in character values grid– Single vs. multiple? E.g. for some kind of compare functionality?

• Column Autosize not supported

• Small tweaks– Control mode: Look ahead to filter values? Column seperation lines– Stripe rows– Track mouse over

• Widgets where appropriate:– Progress bar instead of Coverage <div>?– Color cell?– Date?– Taxon name: Button to open text?– … that’s where the user is supposed to dream– http://www.sencha.com/examples/#ExamplePlace:cellgrid

Page 17: Matrix Review

Progress/Requirements

Page 18: Matrix Review

Parallel Computing

• Dining philosophers problem

Page 19: Matrix Review

Synchronization

• “Doing things at the same time trying not to get into each others way“

• Doing things at the same time can mean many things, crucial for us is: sharing computational resources, e.g. stanford parser access

Page 20: Matrix Review

Another way of looking at it…

You as the designer/coder are “creating the streets and traffic rules”

Page 21: Matrix Review

Critical Section• The critical section (CS) of a process is the block of code

where shared state (e.g., global variables) are accessed and possibly manipulated– (Sidenote: Knowing this should influence the design of your code)

• Problems:– Non-deterministic execution order: Explosion of possible behavior– Data Race, Race Condition– Mutual Exclusion– Absence of Deadlock– Absence of Starvation

public class ApplePicker() {

private int count = 0;

public void pickApple() { count++; System.out.println(“Picked an apple, we now have: “ + count + “apples”); }}

Page 22: Matrix Review

Synchronization Primitives

• Semaphore, lock, monitor, barrier, or latch to guard critical section

• Block execution until “free”. Don’t do:

boolean resourceIsInUse = true;…while(resourceIsInUse() { }

Page 23: Matrix Review

Example

• Shared resource by multiple threads: HashMap -> ConcurrentModificationException

• http://docs.oracle.com/javase/7/docs/api/java/util/HashMap.html

Page 24: Matrix Review

Synchronization in Java• Each object in java has a lock associated• The thread who holds the lock may perform actions on the object, others have

to wait.

• Also, each object Is associated with a monitor: wait(), wait(n), notify(), notifyAll() can be used to synchronize

• If interested in details, e.g. http://pages.cs.wisc.edu/~fischer/cs538.s06/lectures/Lecture34.4up.pdf

public class ApplePicker() {

private int count = 0;

public synchronized void pickApple() { count++; System.out.println(“Picked an apple, we now have: “ + count + “apples”); }}

Object obj;….synchronized(obj) { //implicitely getLock(obj) obj.doSomething(); //implicitely freeLock(obj)}….

Page 25: Matrix Review

In practice

• Speed up of computation -> Optional concurrency to obtain result quicker Vs.• “Multiple agents” – like application-> Inherently concurrent execution

E.g. POS-Tag sentences vs. modeling Dining Philosophers

Page 26: Matrix Review

In practice• Identify part of code that can naturally be parallelized (can be

executed independent from each other, e.g. sentence POS tagging)• Then likely no critical section at all • Avoids all complications and can be implemented relatively easy.• However, beware:

1. Sentence POS tagging itself may be in nature independently solvable for each sentence. However, the resources to complete the task (e.g. Stanford CoreNLP) may pose a CS. They then can either be instantiated multiple times, synchronized as shown, … or rewritten

2. Not all parallelization results in speedup. a) Depending on the task to solve the overhead to create and manage a number

of threads can overweight.b) Amdahls law

Page 27: Matrix Review
Page 28: Matrix Review

In practice

• Debugging becomes harder, due to • Non-deterministic execution order: Explosion of possible

behavior• What that means• Multiple threads in Eclipse debug mode that may need to

be stepped through and coordinated to achieve the desired execution order

• Log files are written by multiple threads at the same time leading to less intuitively readable results

• Turn off parallelization for debugging, if possible

Page 29: Matrix Review
Page 30: Matrix Review

• As an addition: I believe all of the classes we use from Java for creation of threads and to synchronize them if necessary * come from this package:

• http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/package-frame.html

• Notable ones (because they are used in our code):• ExecutorService

• Future

• CountDownLatch • and subclasses of those