From eb446e8ff9c349bd6d594e14d349729707c75626 Mon Sep 17 00:00:00 2001 From: MainHHH Date: Fri, 22 Nov 2024 17:33:33 +0900 Subject: [PATCH] =?UTF-8?q?[delete]=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- accuracy.py | 37 ---------------- requirements.txt | 109 ----------------------------------------------- 2 files changed, 146 deletions(-) delete mode 100644 accuracy.py delete mode 100644 requirements.txt diff --git a/accuracy.py b/accuracy.py deleted file mode 100644 index 9319513..0000000 --- a/accuracy.py +++ /dev/null @@ -1,37 +0,0 @@ -from filtering import * - -class RecommenderEvaluator: - def __init__(self, df): - # 데이터프레임 및 모델 초기화 - self.df = df - self.recommender = FastSkincareRecommender(df) - - def accuracy(self): - prediction = [] - - for i in range(len(self.df)): - new_data = self.df[i:i + 1] - recommendations = self.recommender.fit_and_recommend(new_data=new_data, n_recommendations=3) - recommend_product = [goodsName for goodsName, _ in recommendations] - prediction.append(self.hit_rate(new_data['goodsName'][i], recommend_product)) - - return prediction - - def hit_rate(self, gt_item, pred_items): - if gt_item in pred_items: - return 1 - return 0 - - def evaluate(self): - # 정확도를 계산하고 결과 출력 - prediction = self.accuracy() - accuracy_score = sum(prediction) / len(prediction) if prediction else 0 - print(f"Accuracy: {accuracy_score:.2f}") - return accuracy_score - - -'''# 클래스 사용 예시 -if __name__ == "__main__": - # df는 데이터프레임으로 정의되어 있어야 함 - evaluator = RecommenderEvaluator(df) - evaluator.evaluate()''' diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index a5a004c..0000000 --- a/requirements.txt +++ /dev/null @@ -1,109 +0,0 @@ -anyio==4.6.2.post1 -appnope==0.1.4 -argon2-cffi==23.1.0 -argon2-cffi-bindings==21.2.0 -arrow==1.3.0 -asttokens==2.4.1 -async-lru==2.0.4 -attrs==24.2.0 -babel==2.16.0 -beautifulsoup4==4.12.3 -bleach==6.2.0 -certifi==2024.8.30 -cffi==1.17.1 -charset-normalizer==3.4.0 -comm==0.2.2 -contourpy==1.3.0 -cycler==0.12.1 -debugpy==1.8.8 -decorator==5.1.1 -defusedxml==0.7.1 -executing==2.1.0 -fastjsonschema==2.20.0 -fonttools==4.54.1 -fqdn==1.5.1 -h11==0.14.0 -httpcore==1.0.6 -httpx==0.27.2 -idna==3.10 -ipykernel==6.29.5 -ipython==8.29.0 -isoduration==20.11.0 -jedi==0.19.1 -Jinja2==3.1.4 -joblib==1.4.2 -JPype1==1.5.0 -json5==0.9.25 -jsonpointer==3.0.0 -jsonschema==4.23.0 -jsonschema-specifications==2024.10.1 -jupyter-events==0.10.0 -jupyter-lsp==2.2.5 -jupyter_client==8.6.3 -jupyter_core==5.7.2 -jupyter_server==2.14.2 -jupyter_server_terminals==0.5.3 -jupyterlab==4.2.5 -jupyterlab_pygments==0.3.0 -jupyterlab_server==2.27.3 -kiwisolver==1.4.7 -konlpy==0.6.0 -lxml==5.3.0 -MarkupSafe==3.0.2 -matplotlib==3.9.2 -matplotlib-inline==0.1.7 -mistune==3.0.2 -nbclient==0.10.0 -nbconvert==7.16.4 -nbformat==5.10.4 -nest-asyncio==1.6.0 -notebook==7.2.2 -notebook_shim==0.2.4 -numpy==2.1.3 -overrides==7.7.0 -packaging==24.2 -pandas==2.2.3 -pandocfilters==1.5.1 -parso==0.8.4 -pexpect==4.9.0 -pillow==11.0.0 -platformdirs==4.3.6 -prometheus_client==0.21.0 -prompt_toolkit==3.0.48 -psutil==6.1.0 -ptyprocess==0.7.0 -pure_eval==0.2.3 -pycparser==2.22 -Pygments==2.18.0 -pyparsing==3.2.0 -python-dateutil==2.9.0.post0 -python-json-logger==2.0.7 -pytz==2024.2 -PyYAML==6.0.2 -pyzmq==26.2.0 -referencing==0.35.1 -requests==2.32.3 -rfc3339-validator==0.1.4 -rfc3986-validator==0.1.1 -rpds-py==0.21.0 -scikit-learn==1.5.2 -scipy==1.14.1 -Send2Trash==1.8.3 -six==1.16.0 -sniffio==1.3.1 -soupsieve==2.6 -stack-data==0.6.3 -terminado==0.18.1 -threadpoolctl==3.5.0 -tinycss2==1.4.0 -tornado==6.4.1 -traitlets==5.14.3 -types-python-dateutil==2.9.0.20241003 -typing_extensions==4.12.2 -tzdata==2024.2 -uri-template==1.3.0 -urllib3==2.2.3 -wcwidth==0.2.13 -webcolors==24.8.0 -webencodings==0.5.1 -websocket-client==1.8.0