Description Usage Arguments Value Author(s) See Also Examples
It predicts the optimal treatments with model of class 'rbfcl'
, which is estimated by wsvm
with 'rbf'
kernel.
1 2 |
object |
model of class 'rbfcl' |
x |
a matrix of feature variables, n by p, p is the dimension of feature variables |
... |
further arguments passed to or from other methods. |
a vector of optimal treatments, each entry is for a row in x, the matrix of new feature variables.
Ying Liu yl2802@cumc.columbia.edu http://www.columbia.edu/~yl2802/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | n_cluster=5
pinfo=10
pnoise=10
n=50
m=20
example1=make_classification(n_cluster,pinfo,pnoise,n)
test=make_classification(n_cluster,pinfo,pnoise,m,example1$centroids)
model1=Olearning_Single(example1$X,example1$A,example1$R)
Atp=predict(model1,test$X)
V1=mean(test$R[Atp==test$A])
model2=wsvm(example1$X,example1$A,example1$R,'rbf',0.05)
model2=Olearning_Single(example1$X,example1$A,example1$R,kernel='rbf',m=3)
Atp=predict(model2,test$X)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.