Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Wang <jay@zijie.wang>
  • Loading branch information
xiaohk committed Jul 15, 2022
1 parent fc427c8 commit 1705488
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/GAM.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -261,19 +261,18 @@
});
targetFeatureIndex = featureSelectList[tempSelectedFeature.type].map(d => d.name).indexOf(lastEditName);
} else {
// Initialize GAM Changer using the continuous variable with the highest importance
if(featureSelectList.continuous.length !== 0) {
// Initialize GAM Changer using the continuous variable with the highest importance
targetFeatureIndex = d3.maxIndex(featureSelectList.continuous, d => d.importance);
tempSelectedFeature.type = 'continuous';
} else {
// If there is no continuous variable, initialize GAM Changer using
// the categorical variable with the highest importance
targetFeatureIndex = d3.maxIndex(featureSelectList.categorical, d => d.importance);
tempSelectedFeature.type = 'categorical';
}
}
tempSelectedFeature.data = data.features[featureSelectList[tempSelectedFeature.type][targetFeatureIndex].featureID];
tempSelectedFeature.id = featureSelectList[tempSelectedFeature.type][targetFeatureIndex].featureID;
tempSelectedFeature.name = featureSelectList[tempSelectedFeature.type][targetFeatureIndex].name;
Expand Down

0 comments on commit 1705488

Please sign in to comment.