singlepoint transforms/predicts added to help

nix
Pierre Alexandre Tremblay 5 years ago
parent e16e03fd46
commit 1f5dd27ea8

@ -142,6 +142,9 @@ w.refresh;
w.front; w.front;
) )
// single point transform on arbitrary value
~inbuf = Buffer.loadCollection(s,0.5.dup);
~kmeans.predictPoint(~inbuf,{|x|x.postln;});
:: ::
subsection:: Server Side Queries subsection:: Server Side Queries

@ -141,6 +141,10 @@ w.drawFunc = {
w.refresh; w.refresh;
w.front; w.front;
) )
// single point prediction on arbitrary value
~inbuf = Buffer.loadCollection(s,0.5.dup);
~classifier.predictPoint(~inbuf,{|x|x.postln;});
:: ::
subsection::Server Side Queries subsection::Server Side Queries

@ -106,6 +106,10 @@ d = Dictionary.with(
//We should see a single cycle of a chirp //We should see a single cycle of a chirp
~outputdata.plot; ~outputdata.plot;
// single point transform on arbitrary value
~inbuf = Buffer.loadCollection(s,[0.5]);
~regressor.predictPoint(~inbuf,{|x|x.postln;});
:: ::
subsection:: Server Side Queries subsection:: Server Side Queries

@ -150,6 +150,10 @@ w.drawFunc = {
w.refresh; w.refresh;
w.front; w.front;
) )
// single point transform on arbitrary value
~inbuf = Buffer.loadCollection(s,0.5.dup);
~classifier.predictPoint(~inbuf,{|x|x.postln;});
:: ::

@ -162,6 +162,11 @@ d = Dictionary.with(
//We should see a single cycle of a chirp. If not, fit a little more epochs //We should see a single cycle of a chirp. If not, fit a little more epochs
~outputdata.plot; ~outputdata.plot;
// single point transform on arbitrary value
~inbuf = Buffer.loadCollection(s,[0.5]);
~outbuf = Buffer.new(s);
~regressor.predictPoint(~inbuf,~outbuf,{|x|x.postln;x.getn(0,1,{|y|y.postln;};)});
:: ::
subsection:: Server Side Queries subsection:: Server Side Queries

@ -126,6 +126,12 @@ FluidBufPitch.process(s,~audio, features: ~pitch_feature);
~plot2 = ~normedarray.flatten(1).unlace.plot("Normalized",Rect(410,0,400,400)).plotMode=\bars; ~plot2 = ~normedarray.flatten(1).unlace.plot("Normalized",Rect(410,0,400,400)).plotMode=\bars;
) )
// single point transform on arbitrary value
~inbuf = Buffer.loadCollection(s,0.5.dup);
~outbuf = Buffer.new(s);
~normalizer.transformPoint(~inbuf,~outbuf,{|x|x.postln;x.getn(0,2,{|y|y.postln;};)});
//Server side queries //Server side queries
//Setup //Setup
( (

@ -114,6 +114,12 @@ FluidBufPitch.process(s,~audio, features: ~pitch_feature);
~rawarray.flatten(1).unlace.plot("Unstandardized",Rect(0,0,400,400),minval:0,maxval:[5000,1]).plotMode=\bars; ~rawarray.flatten(1).unlace.plot("Unstandardized",Rect(0,0,400,400),minval:0,maxval:[5000,1]).plotMode=\bars;
~plot2 = ~stdarray.flatten(1).unlace.plot("Standardized",Rect(410,0,400,400)).plotMode=\bars; ~plot2 = ~stdarray.flatten(1).unlace.plot("Standardized",Rect(410,0,400,400)).plotMode=\bars;
) )
// single point transform on arbitrary value
~inbuf = Buffer.loadCollection(s,0.5.dup);
~outbuf = Buffer.new(s);
~standardizer.transformPoint(~inbuf,~outbuf,{|x|x.postln;x.getn(0,2,{|y|y.postln;};)});
:: ::
subsection::Server Side Querying subsection::Server Side Querying

Loading…
Cancel
Save