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