def sim_target_fixed(target_data, target_labels, sigma, idx, target_params):
"""
Sets as target to have fixed similarity between all the training samples
:param target_data: (not used)
:param target_labels: (not used)
:param sigma: not used
:param idx: indices of the data samples to be used for the calculation of the similarity matrix
:param target_params: expect to found the 'target_value' here
:return: the similarity matrix and the corresponding mask
"""
if 'target_value' not in target_params:
target_params['target_value'] = 0.0
Gt = np.ones((len(idx), len(idx)))
Gt = Gt * target_params['target_value']
Gt_mask = np.ones_like(Gt)
return np.float32(Gt), np.float32(Gt_mask)
评论列表
文章目录