powered by
This function performs Immigrate(Iterative Max-Min Entropy Margin-Maximization with Interaction Terms) algorithm for one loop.
one.Immigrate(train_xx, train_yy, W, sig = 1)
model matrix of explanatory variables
label vector
initial weight matrix
sigma used in algorithm, default to be 1
new weight matrix after one loop
cost after one loop
Please refer to https://github.com/RuzhangZhao/Immigrate/ for implementation demo.
# NOT RUN { data(park) xx<-park$xx yy<-park$yy W0 <- diag(rep(1,ncol(xx)),ncol(xx))/sqrt(ncol(xx)) re<-one.Immigrate(xx,yy,W0) print(re$w) # }
Run the code above in your browser using DataLab