Download Algorithm and Data structures and more Lecture notes Data Structures and Algorithms in PDF only on Docsity!
Lecture 3 – Algoritm’s evaluation
and presentation
Kamilla Klonowska
Subjects
- How To Present Research Data?
- https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4453119/
- Presenting data in tables and charts
- https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4008059/
- https://www.slideshare.net/YesicaYulianAdicondr/presenting-
data-in-tables-and-charts
- Analyzing the algoritm by analyzing the results/output data
- Limitations 2
Data presentation in a Text
- Data (numbers) are often better presented in a table or a graph , while the interpretations are better stated in text. - However, if the data is too few, the data can be described in a text
- Avoid such combination of the words like “remarkably” decreased, “extremely” different and “obviously” higher. (doubleling) 4
Examples
- Mean baseline HbA1c of 73 diabetic patients before intervention was 8.9% and mean HbA1c after intervention was 7.8%.
- Mean HbA1c of 73 of diabetic patients decreased from 8.9% to 7.8% after an intervention.
- Analyze it and discuss why nr 2 is better improvement. 5
Data presentation in a Table
7 Input Output 1 0,00034 (ms) (^10) 0,001 (ms) 100 0,03 (ms) (^500) 1 (ms) 1000 23 (ms) 1000000 1,12E+04 (ms)
Input column:
- No consequence in the input values!
- Adjust the margin to the right
Suggestions: input: 10, 100, 1000, 10000, (input x 10)
If the results are not satisfactory, do more tests with more inputs, e.g.
10, 50, 100, 500, 1000 etc.
or 1, 2, 3, …. all positive integers from 1 to 1000 000.
Output column:
- The values have to have the same format, i.e. same number of decimals!
- Delete units
Expose the headlines, i.e. using bold and centered alignment
Data presentation in a Table
8 Input Output 1 0,00034 (ms) (^10) 0,001 (ms) 100 0,03 (ms) (^500) 1 (ms) 1000 23 (ms) 1000000 1,12E+04 (ms)
Input column:
- No consequence in the input values!
- Adjust the margin to the right
Suggestions: input: 10, 100, 1000, 10000, (input x 10)
If the results are not satisfactory for the analysis, test with more inputs, e.g.
10, 50, 100, 500, 1000 etc.
or 1, 2, 3, …. all positive integers from 1 to 1000 000.
Output column:
- The values have to have the same format, i.e. same number of decimals!
- Delete units
Expose the headlines, i.e. using bold and centered alignment
Input Output (ms) 1 0, (^10) 0, 100 0, 1000 23,
- Data presentation in a Table – Good Ex. - 4 0,0017 0,0013 0,0040 0, Nr N Recursive Iterative Recursive Iterative - 8 0,0014 0,0011 0,0044 0, - 16 0,0041 0,0031 0,0118 0, - 32 0,0121 0,0105 0,0263 0, - 64 0,0413 0,0388 0,0445 0, - 128 0,0292 0,1412 0,0223 0, - 256 0,0236 0,3918 0,0528 0, - 512 0,0438 0,3703 0,0993 0, - 1024 0,1630 0,2618 0,1691 0, - 2048 0,6186 0,5893 0,3195 0, - 4096 1,6843 2,1272 0,5985 0, - 8192 6,6380 5,8817 0,8618 0,
- 16384 25,9930 24,0050 1,9581 1,
- Data presentation in a Table – Good Ex. - Algorithm (ms) \ Input
- QuickSort(), random pivot, Iterative (Avg) 0,0074 0,0713 1,
- QuickSort(), random pivot, Recursive(Avg): 0,0077 0,0738 0,
- QuickSort(), Median-of-three pivot,Iterative (Avg): 0,0067 0,0372 0,
- QuickSort(), Median-of-three pivot,Recursive (Avg): 0,0054 0,0362 0,
- QuickSort(), array[0] pivot, Iterative(Avg): 0,0037 0,0327 0,
- QuickSort(), array[0] pivot, Recursive(Avg): 0,0041 0,0370 0,
- MergeSort, Iterative (Avg): 0,0082 0,0428 0,
- MergeSort, Recursive (Avg): 0,0061 0,0598 0,
- InsertionSort, Iterative (Avg): 0,0024 0,0861 7,
- InsertionSort, Recursive (Avg): 0,0053 0,0759 5,
Data presentation in a Graph / Diagram
- Type of graphs http://www.intellspot.com/types-graphs-charts/ 11
Guidelines (cont)
- Minimize Ink: No grid lines, more details
- Use Commonly accepted practices: origin at (0,0) Independent variable (cause) along x axis, linear scales, increasing scales, equal divisions
- Avoid ambiguity: Show coordinate axes, scale divisions, origin. Identify individual curves and bars.
- See checklist for good graphs (next slide)
Checklist for Good Graphics
1. Are both coordinate axes shown and labeled?
2. Are the scales and divisions shown on both axes?
3. Is the number of curves reasonably small? (A line chart should generally have no more
than six curves).
4. Do all graphs use the same scale? (Multiple scales on the same chart are confusing.)
5. Are the curves on a line chart individually labeled?
6. Are the cells in a bar chart individually labeled?
7. Are all symbols on the graph accompanied by appropriate textual explanations?
8. If the curves cross, are the line patterns different to avoid confusion?
9. Are the units of measurement indicated?
10. Is the horizontal scale increasing from left to right?
11. Is the vertical scale increasing from bottom to top?
12. Are the grid lines aiding in reading the curves? (If not, the grid lines should not be
shown.)
13. Does this whole chart add to information available to the reader?
14. Are the scales contiguous? (Breaks in the scale should be avoided or clearly shown.)
15. Is there a title for the whole chart?
16. Is the figure referenced and discussed in the text of the report?
14
Common Mistakes in Charts (Cont)
- Using symbols in place of text
- Placing extraneous information on the chart: grid lines, granularity of the grid lines
- Selecting scale ranges improperly: automatic selection by programs may not be appropriate
Common Mistakes in Charts (Cont)
- Using a line chart in place of column chart: line => Continuity CPU Type 8000 8100 8200 8300 MIPS
Pictorial Games (Cont)
- Using inappropriate cell size in histograms [0,2) [2,4) [4,6) [6,8) [8,10) [10,12) [0,6) [6,12) Response Time Response Time Frequency (^) Frequency 2
Pictorial Games (Cont)
- Using broken scales in column charts
A
System
Resp.
Time
B C D E F^ A
System
Resp.
Time
B C D E F