// Iterate till max iteration reached or all weights are really tiny
while ((iteration < self.max_iter) & (any(w >= 0.0001 for w in distance_weights))):
// Run Core Relief-based algorithm
core_fit = core.fit(self.X_mat, self._y, distance_weights, self.weight_flag)
After Change
core_fit = core.fit(self.X_mat, self._y, distance_weights, self.weight_flag)
//reset distance_weights so that only previous run affects next one
distance_weights = np.ones(total_num_features)
// When all weights become 0, break
if all(w == 0 for w in core_fit.feature_importances_):