|
|
|
@ -28,18 +28,22 @@ FluidKNNRegressor : FluidModelObject {
|
|
|
|
this.prSendMsg(this.predictMsg(sourceDataSet, targetDataSet));
|
|
|
|
this.prSendMsg(this.predictMsg(sourceDataSet, targetDataSet));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
predictPointMsg { |buffer|
|
|
|
|
predictPointMsg { |sourceBuffer, targetBuffer|
|
|
|
|
^this.prMakeMsg(\predictPoint,id, this.prEncodeBuffer(buffer));
|
|
|
|
^this.prMakeMsg(\predictPoint,id,
|
|
|
|
|
|
|
|
this.prEncodeBuffer(sourceBuffer),
|
|
|
|
|
|
|
|
this.prEncodeBuffer(targetBuffer),
|
|
|
|
|
|
|
|
["/b_query", targetBuffer.asUGenInput]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
predictPoint { |buffer, action|
|
|
|
|
predictPoint { |sourceBuffer, targetBuffer, action|
|
|
|
|
actions[\predictPoint] = [number(FluidMessageResponse,_,_),action];
|
|
|
|
actions[\predictPoint] = [nil,{action.value(targetBuffer)}];
|
|
|
|
this.prSendMsg(this.predictPointMsg(buffer));
|
|
|
|
this.predictPointMsg(sourceBuffer, targetBuffer);
|
|
|
|
|
|
|
|
this.prSendMsg(this.predictPointMsg(sourceBuffer, targetBuffer));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kr{|trig, inputBuffer,outputBuffer|
|
|
|
|
kr{|trig, inputBuffer, outputBuffer, numNeighbours, weight|
|
|
|
|
^FluidKNNRegressorQuery.kr(K2A.ar(trig),
|
|
|
|
^FluidKNNRegressorQuery.kr(K2A.ar(trig),
|
|
|
|
this, this.numNeighbours, this.weight,
|
|
|
|
this, numNeighbours??{this.numNeighbours}, weight??{this.weight},
|
|
|
|
this.prEncodeBuffer(inputBuffer),
|
|
|
|
this.prEncodeBuffer(inputBuffer),
|
|
|
|
this.prEncodeBuffer(outputBuffer));
|
|
|
|
this.prEncodeBuffer(outputBuffer));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|