Daniel@0:
Daniel@0: Daniel@0:
Daniel@0: :- use_module(library(computations)). Daniel@0: :- use_module(library(mlserver)). Daniel@0: :- use_module(library(real)). Daniel@0: :- use_module(library(dml_c3)). Daniel@0: :- include(search). Daniel@0: :- use_rendering(rdf,[resource_format(nslabel)]). Daniel@0: :- use_rendering(c3). Daniel@0: Daniel@0: transform_memo(Class,Transform,In,Out) :- Daniel@0: transform(Class,Transform), Daniel@0: computation_memo(Transform,In,Out). Daniel@0: Daniel@0: op_chart(Op,CSV,Chart) :- Daniel@0: csv_op(Op,CSV,Result), Daniel@0: csv_op_chart(Op,Result,Chart). Daniel@0:
Daniel@0: Daniel@0:
Daniel@0: Histogram of durations of computations on CSV files. Daniel@0:
Daniel@0: Daniel@0:
Daniel@0: findall(Dur,browse(computations:csv_op_memo(A,B,_C),comp(_,_,Dur)-ok),_Durs), Daniel@0: [Counts,Map] === hist1d(transpose(_Durs),edgemap(0:0.01:2)), Daniel@0: array_list(Counts,_LC), Daniel@0: c3_hist(steps,dur,Map,_LC,Chart). Daniel@0:
Daniel@0: Daniel@0:
Daniel@0: Recording level analyses... Daniel@0:
Daniel@0: Daniel@0:
Daniel@0: distinct(A,browse(computations:csv_op_memo(A,B,_C),comp(_,_,Dur)-ok)), Daniel@0: computation(_,Rec,B), Daniel@0: writeln(doing(A,B)), Daniel@0: csv_op_chart(A,_C,D). Daniel@0:
Daniel@0: Daniel@0:
Daniel@0: Collection level analyses... Daniel@0:
Daniel@0: Daniel@0:
Daniel@0: distinct(Name/Arity, Daniel@0: ( browse(perspectives:cla_memo(A,B,_C),comp(_,_,Dur)-ok), Daniel@0: functor(A,Name,Arity))), Daniel@0: cla_op_chart(A,_C,Chart), Daniel@0: dataset_size(B,Size). Daniel@0:
Daniel@0: Daniel@0:
Daniel@0: This example shows how VAMP computations can be triggered on demand. Daniel@0:
Daniel@0: Daniel@0:
Daniel@0: X :: title(piano) /\ title(sonata), Daniel@0: transform_memo(tempo,_,X,Y), Daniel@0: op_chart(uniform_tempo_r(linear,2),Y,Chart). Daniel@0:
Daniel@0: Daniel@0: