KNNClassifier / Regressor review
parent
b2338ed9d9
commit
d96dbb8791
@ -1,30 +1,29 @@
|
||||
FluidKNNClassifier : FluidManipulationClient {
|
||||
|
||||
*new {|server|
|
||||
var uid = UniqueID.next;
|
||||
^super.new(server,uid)!?{|inst|inst.init(uid);inst}
|
||||
}
|
||||
var uid = UniqueID.next;
|
||||
^super.new(server,uid)!?{|inst|inst.init(uid);inst}
|
||||
}
|
||||
|
||||
init {|uid|
|
||||
id = uid;
|
||||
}
|
||||
init {|uid|
|
||||
id = uid;
|
||||
}
|
||||
|
||||
fit{|dataset, labelset, action|
|
||||
this.prSendMsg(\fit,[dataset.asSymbol, labelset.asSymbol], action);
|
||||
}
|
||||
fit{|dataset, labelset, action|
|
||||
this.prSendMsg(\fit,[dataset.asSymbol, labelset.asSymbol], action);
|
||||
}
|
||||
|
||||
predict{ |dataset, labelset, k, uniform = 0, action|
|
||||
this.prSendMsg(\predict,
|
||||
predict{|dataset, labelset, k, uniform = 0, action|
|
||||
this.prSendMsg(\predict,
|
||||
[dataset.asSymbol, labelset.asSymbol, k, uniform],
|
||||
action);
|
||||
}
|
||||
}
|
||||
|
||||
predictPoint { |buffer, k, uniform = 0, action|
|
||||
this.prSendMsg(\predictPoint,
|
||||
[buffer.asUGenInput, k,uniform], action,
|
||||
predictPoint {|buffer, k, uniform = 0, action|
|
||||
this.prSendMsg(\predictPoint,
|
||||
[buffer.asUGenInput, k, uniform], action,
|
||||
[string(FluidMessageResponse,_,_)]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,29 +1,29 @@
|
||||
FluidKNNRegressor : FluidManipulationClient {
|
||||
|
||||
*new {|server|
|
||||
var uid = UniqueID.next;
|
||||
^super.new(server,uid)!?{|inst|inst.init(uid);inst}
|
||||
}
|
||||
var uid = UniqueID.next;
|
||||
^super.new(server,uid)!?{|inst|inst.init(uid);inst}
|
||||
}
|
||||
|
||||
init {|uid|
|
||||
id = uid;
|
||||
}
|
||||
init {|uid|
|
||||
id = uid;
|
||||
}
|
||||
|
||||
fit{|sourceDataset, targetDataset, action|
|
||||
this.prSendMsg(\fit,
|
||||
fit{|sourceDataset, targetDataset, action|
|
||||
this.prSendMsg(\fit,
|
||||
[sourceDataset.asSymbol, targetDataset.asSymbol],
|
||||
action
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
predict{ |sourceDataset, targetDataset, k, uniform = 0, action|
|
||||
this.prSendMsg(\predict,
|
||||
predict{ |sourceDataset, targetDataset, k, uniform = 0, action|
|
||||
this.prSendMsg(\predict,
|
||||
[sourceDataset.asSymbol, targetDataset.asSymbol, k, uniform],
|
||||
action);
|
||||
}
|
||||
}
|
||||
|
||||
predictPoint { |buffer, k, uniform = 0, action|
|
||||
this.prSendMsg(\predictPoint, [buffer.asUGenInput, k,uniform], action,
|
||||
predictPoint { |buffer, k, uniform = 0, action|
|
||||
this.prSendMsg(\predictPoint, [buffer.asUGenInput, k, uniform], action,
|
||||
[number(FluidMessageResponse,_,_)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue