cd3662fc8c6a4e2851cdfcd81513611d3d9b7467,skrebate/scoring_utils.py,,SURF_compute_scores,#,445
Before 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):
After 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):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 27
Instances
Project Name: EpistasisLab/scikit-rebate
Commit Name: cd3662fc8c6a4e2851cdfcd81513611d3d9b7467
Time: 2020-01-29
Author: alexmxu99@gmail.com
File Name: skrebate/scoring_utils.py
Class Name:
Method Name: SURF_compute_scores
Project Name: EpistasisLab/scikit-rebate
Commit Name: cd3662fc8c6a4e2851cdfcd81513611d3d9b7467
Time: 2020-01-29
Author: alexmxu99@gmail.com
File Name: skrebate/scoring_utils.py
Class Name:
Method Name: MultiSURF_compute_scores
Project Name: EpistasisLab/scikit-rebate
Commit Name: cd3662fc8c6a4e2851cdfcd81513611d3d9b7467
Time: 2020-01-29
Author: alexmxu99@gmail.com
File Name: skrebate/scoring_utils.py
Class Name:
Method Name: SURF_compute_scores
Project Name: EpistasisLab/scikit-rebate
Commit Name: cd3662fc8c6a4e2851cdfcd81513611d3d9b7467
Time: 2020-01-29
Author: alexmxu99@gmail.com
File Name: skrebate/scoring_utils.py
Class Name:
Method Name: MultiSURFstar_compute_scores
Project Name: EpistasisLab/scikit-rebate
Commit Name: cd3662fc8c6a4e2851cdfcd81513611d3d9b7467
Time: 2020-01-29
Author: alexmxu99@gmail.com
File Name: skrebate/scoring_utils.py
Class Name:
Method Name: ReliefF_compute_scores