Mercurial > hg > dml-open-cliopatria
comparison cpack/dml/examples/csv_op_viewer.swinb @ 0:718306e29690 tip
commiting public release
author | Daniel Wolff |
---|---|
date | Tue, 09 Feb 2016 21:05:06 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:718306e29690 |
---|---|
1 <div class="notebook"> | |
2 | |
3 <div class="nb-cell program"> | |
4 :- use_module(library(computations)). | |
5 :- use_module(library(mlserver)). | |
6 :- use_module(library(real)). | |
7 :- use_module(library(dml_c3)). | |
8 :- include(search). | |
9 :- use_rendering(rdf,[resource_format(nslabel)]). | |
10 :- use_rendering(c3). | |
11 | |
12 transform_memo(Class,Transform,In,Out) :- | |
13 transform(Class,Transform), | |
14 computation_memo(Transform,In,Out). | |
15 | |
16 op_chart(Op,CSV,Chart) :- | |
17 csv_op(Op,CSV,Result), | |
18 csv_op_chart(Op,Result,Chart). | |
19 </div> | |
20 | |
21 <div class="nb-cell markdown"> | |
22 Histogram of durations of computations on CSV files. | |
23 </div> | |
24 | |
25 <div class="nb-cell query"> | |
26 findall(Dur,browse(computations:csv_op_memo(A,B,_C),comp(_,_,Dur)-ok),_Durs), | |
27 [Counts,Map] === hist1d(transpose(_Durs),edgemap(0:0.01:2)), | |
28 array_list(Counts,_LC), | |
29 c3_hist(steps,dur,Map,_LC,Chart). | |
30 </div> | |
31 | |
32 <div class="nb-cell markdown"> | |
33 Recording level analyses... | |
34 </div> | |
35 | |
36 <div class="nb-cell query"> | |
37 distinct(A,browse(computations:csv_op_memo(A,B,_C),comp(_,_,Dur)-ok)), | |
38 computation(_,Rec,B), | |
39 writeln(doing(A,B)), | |
40 csv_op_chart(A,_C,D). | |
41 </div> | |
42 | |
43 <div class="nb-cell markdown"> | |
44 Collection level analyses... | |
45 </div> | |
46 | |
47 <div class="nb-cell query"> | |
48 distinct(Name/Arity, | |
49 ( browse(perspectives:cla_memo(A,B,_C),comp(_,_,Dur)-ok), | |
50 functor(A,Name,Arity))), | |
51 cla_op_chart(A,_C,Chart), | |
52 dataset_size(B,Size). | |
53 </div> | |
54 | |
55 <div class="nb-cell markdown"> | |
56 This example shows how VAMP computations can be triggered on demand. | |
57 </div> | |
58 | |
59 <div class="nb-cell query"> | |
60 X :: title(piano) /\ title(sonata), | |
61 transform_memo(tempo,_,X,Y), | |
62 op_chart(uniform_tempo_r(linear,2),Y,Chart). | |
63 </div> | |
64 | |
65 </div> |