// Iterate till max iteration reached or all weights are really tinywhile ((iteration < self.max_iter) & (any(w >= 0.0001for 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 onedistance_weights = np.ones(total_num_features)// When all weights become 0, breakifall(w == 0for w in core_fit.feature_importances_):