a377e3346a13812799194803cc0f99c7e8b096d6,skrebate/scoring_utils.py,,SURF_compute_scores,#,361
Before Change
scores = np.zeros(num_attributes)
if len(NN) <= 0:
return scores
for feature_num in range(num_attributes):
scores[feature_num] += compute_score(attr, mcmap, NN, feature_num, inst,
nan_entries, headers, class_type, X, y, labels_std, data_type)
return scores
def SURFstar_compute_scores(inst, attr, nan_entries, num_attributes, mcmap, NN_near, NN_far, headers, class_type, X, y, labels_std, data_type):
After Change
def SURF_compute_scores(inst, attr, nan_entries, num_attributes, mcmap, NN, headers, class_type, X, y, labels_std, data_type, weight_flag=0, weights=None):
Unique scoring procedure for SURF algorithm. Scoring based on nearest neighbors within defined radius of current target instance.
scores = np.zeros(num_attributes)
if weight_flag == 2:
if len(NN) <= 0:
return scores
for feature_num in range(num_attributes):
scores[feature_num] += weights[feature_num]*compute_score(attr, mcmap, NN, feature_num, inst,
nan_entries, headers, class_type, X, y, labels_std, data_type)
else:
if len(NN) <= 0:
return scores
for feature_num in range(num_attributes):
scores[feature_num] += compute_score(attr, mcmap, NN, feature_num, inst,
nan_entries, headers, class_type, X, y, labels_std, data_type)
return scores
def SURFstar_compute_scores(inst, attr, nan_entries, num_attributes, mcmap, NN_near, NN_far, headers, class_type, X, y, labels_std, data_type, weight_flag=0, weights=None):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 28
Instances
Project Name: EpistasisLab/scikit-rebate
Commit Name: a377e3346a13812799194803cc0f99c7e8b096d6
Time: 2018-06-12
Author: saurav.bose93@gmail.com
File Name: skrebate/scoring_utils.py
Class Name:
Method Name: SURF_compute_scores
Project Name: EpistasisLab/scikit-rebate
Commit Name: a377e3346a13812799194803cc0f99c7e8b096d6
Time: 2018-06-12
Author: saurav.bose93@gmail.com
File Name: skrebate/scoring_utils.py
Class Name:
Method Name: SURF_compute_scores
Project Name: EpistasisLab/scikit-rebate
Commit Name: 16798854e7fbca553416409be8f9ff6f71204dac
Time: 2021-02-15
Author: robertzhang100@gmail.com
File Name: skrebate/scoring_utils.py
Class Name:
Method Name: SURF_compute_scores
Project Name: EpistasisLab/scikit-rebate
Commit Name: a377e3346a13812799194803cc0f99c7e8b096d6
Time: 2018-06-12
Author: saurav.bose93@gmail.com
File Name: skrebate/scoring_utils.py
Class Name:
Method Name: MultiSURFstar_compute_scores