use of org.haiku.haikudepotserver.dataobjects.auto._User in project IR_Base by Linda-sunshine.
the class CLinAdaptWithDP method loadUsers.
@Override
public void loadUsers(ArrayList<_User> userList) {
m_userList = new ArrayList<_AdaptStruct>();
// Init each user.
for (_User user : userList) m_userList.add(new _DPAdaptStruct(user, m_dim));
m_pWeights = new double[m_gWeights.length];
}
use of org.haiku.haikudepotserver.dataobjects.auto._User in project IR_Base by Linda-sunshine.
the class CoLinAdapt method constructUserList.
void constructUserList(ArrayList<_User> userList) {
int vSize = 2 * m_dim;
// step 1: create space
m_userList = new ArrayList<_AdaptStruct>();
for (int i = 0; i < userList.size(); i++) {
_User user = userList.get(i);
m_userList.add(new _CoLinAdaptStruct(user, m_dim, i, m_topK));
}
m_pWeights = new double[m_gWeights.length];
// huge space consumption
_CoLinAdaptStruct.sharedA = new double[getVSize()];
// step 2: copy each user's A to shared A in _CoLinAdaptStruct
_CoLinAdaptStruct user;
for (int i = 0; i < m_userList.size(); i++) {
user = (_CoLinAdaptStruct) m_userList.get(i);
System.arraycopy(user.m_A, 0, _CoLinAdaptStruct.sharedA, vSize * i, vSize);
}
}
use of org.haiku.haikudepotserver.dataobjects.auto._User in project IR_Base by Linda-sunshine.
the class CLRWithDP method loadUsers.
@Override
public void loadUsers(ArrayList<_User> userList) {
m_userList = new ArrayList<_AdaptStruct>();
for (_User user : userList) // m_userList.add(new _DPAdaptStruct(user, user.getUserID()));
m_userList.add(new _DPAdaptStruct(user));
m_pWeights = new double[m_gWeights.length];
}
use of org.haiku.haikudepotserver.dataobjects.auto._User in project IR_Base by Linda-sunshine.
the class CoRegLR method loadUsers.
@Override
public void loadUsers(ArrayList<_User> userList) {
int vSize = m_featureSize + 1;
// step 1: create space
m_userList = new ArrayList<_AdaptStruct>();
for (int i = 0; i < userList.size(); i++) {
_User user = userList.get(i);
m_userList.add(new _CoRegLRAdaptStruct(user, i, vSize, m_topK));
}
// huge space consumption
_CoRegLRAdaptStruct.sharedW = new double[vSize * m_userList.size()];
// step 3: construct neighborhood graph
constructNeighborhood(m_sType);
}
use of org.haiku.haikudepotserver.dataobjects.auto._User in project IR_Base by Linda-sunshine.
the class RegLR method loadUsers.
@Override
public void loadUsers(ArrayList<_User> userList) {
m_userList = new ArrayList<_AdaptStruct>();
for (_User user : userList) {
m_userList.add(new _AdaptStruct(user));
user.initModel(m_featureSize + 1);
}
}
Aggregations