Skip to content

Commit

Permalink
[BUG FIX] #411: 유사견적 옵션 순서 자동 sort되도록 버그수정
Browse files Browse the repository at this point in the history
  • Loading branch information
tank3a committed Aug 22, 2023
1 parent 7502240 commit be29c34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend-recommend/recommend.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def recByApriori(body):
antecedents = set(row.antecedents)
consequents = set(row.consequents)

if antecedents.issubset(input) and len(consequents) <= 2 and not antecedents.union(consequents).issubset(input):
if antecedents.isdisjoint(input) and len(consequents) <= 2 and antecedents.union(consequents).isdisjoint(input):
key = tuple(consequents)
if key not in matching_itemsets or confidence > matching_itemsets[key]:
matching_itemsets[key] = confidence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ public HistorySearchDto(int carId, int powerTrainId, int bodyTypeId, int operati
this.optionIds = new ArrayList<>();

this.optionIds.addAll(optionIds);
optionIds.sort(null);
}

public void addAllOption(List<Integer> optionId) {
optionIds.addAll(optionId);
optionIds.sort(null);
}

public String getOptionIds() {
Expand Down

0 comments on commit be29c34

Please sign in to comment.