RETprojects / SWENG480-Team21

This repository contains the code for our capstone project, the Design Pattern Recommendation System.
2 stars 0 forks source link

Getting cosine similarity measures and RCD for all clustering algorithms #67

Closed RETprojects closed 1 year ago

RETprojects commented 1 year ago

Example run of predict.py:

python3 predict.py "Design a tutorial to learn how to program a calculator. This calculator executes the four basic arithmetic operations. The goal of this tutorial is to make it possible to take a set of operations to be executed sequentially. The tutorial presents a button for each arithmetic operation, and two input fields for the operands. After each click on a button of an operation, the user has then the choice to start again or execute the sequence of operations to obtain the result. It is probable that this tutorial evolves in order to make it possible for the user to remove the last operation of the list and to take into account the operation of modulo" --------- Kmeans ------------ 1th pattern: command 71% match 2th pattern: chain_of_responsibility70% match 3th pattern: mediator 68% match 4th pattern: singleton 43% match RCD = 0 --------- fuzzy ------------ 1th pattern: visitor 70% match 2th pattern: mediator 68% match 3th pattern: iterator 67% match 4th pattern: decorator 65% match 5th pattern: interpreter 64% match 6th pattern: bridge 64% match 7th pattern: observer 62% match 8th pattern: facade 60% match 9th pattern: adapter 58% match 10th pattern: composite 58% match 11th pattern: abstract_factory 53% match 12th pattern: singleton 43% match RCD = 0.3333333333333333 --------- hierarchy ------------ 1th pattern: command 71% match 2th pattern: chain_of_responsibility70% match 3th pattern: visitor 70% match 4th pattern: mediator 68% match 5th pattern: iterator 67% match 6th pattern: interpreter 64% match 7th pattern: bridge 64% match 8th pattern: facade 60% match 9th pattern: abstract_factory 53% match RCD = 0 --------- Bi_Bisect ------------ 1th pattern: chain_of_responsibility70% match 2th pattern: visitor 70% match 3th pattern: mediator 68% match 4th pattern: proxy 68% match 5th pattern: builder 67% match 6th pattern: iterator 67% match 7th pattern: decorator 65% match 8th pattern: bridge 64% match 9th pattern: factory_method 61% match 10th pattern: template_method 60% match 11th pattern: adapter 58% match 12th pattern: strategy 48% match 13th pattern: singleton 43% match RCD = 0.15384615384615385 --------- Lc_Bisect ------------ 1th pattern: command 71% match RCD = 0 --------- PAM-EUCLIDEAN ------------ 1th pattern: builder 67% match 2th pattern: template_method 60% match RCD = 0 --------- PAM-MANHATTAN ------------ 1th pattern: bridge 64% match 2th pattern: facade 60% match RCD = 0