-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now Supports More than 200 Algorithms.
A. Modularized main Quazi-computational engine. 1. UF Engine 2. CB Engine 3. Hybrid Aggregator (which will soon used for aggregating computational results 1. and 2.) -------------------------------------------------------------------------- B. added more test assertion in pkg. ------------------------------------------------------------------------- C. Integrated Format Master to EngineBase. -------------------------------------------------------------------------- D. Structered Modular Arch view of base to Event Driven for future shfiting. -------------------------------------------------------------------------- E. Added Examples.
- Loading branch information
1 parent
2d92bee
commit 43a2241
Showing
628 changed files
with
4,517 additions
and
497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from abc import ABC, abstractmethod | ||
from typing import List | ||
|
||
class BaseRecommender(ABC): | ||
@abstractmethod | ||
def fit(self, interaction_matrix, user_ids: List[int], item_ids: List[int]): | ||
""" | ||
Train the recommender system using the provided interaction matrix. | ||
Parameters: | ||
- interaction_matrix (scipy.sparse matrix): User-item interaction matrix. | ||
- user_ids (List[int]): List of user IDs. | ||
- item_ids (List[int]): List of item IDs. | ||
""" | ||
pass | ||
|
||
@abstractmethod | ||
def recommend(self, user_id: int, top_n: int = 10) -> List[int]: | ||
""" | ||
Generate top-N item recommendations for a given user. | ||
Parameters: | ||
- user_id (int): The ID of the user. | ||
- top_n (int): The number of recommendations to generate. | ||
Returns: | ||
- List[int]: List of recommended item IDs. | ||
""" | ||
pass |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG = { | ||
"method": "tfidf", | ||
"params": { | ||
"feature_matrix": None | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CONFIG = { | ||
"collaborative_filtering": { | ||
"method": "matrix_factorization", # Options: matrix_factorization, user_based_cf, etc. | ||
"params": { | ||
"num_factors": 20, | ||
"learning_rate": 0.01, | ||
"regularization": 0.02, | ||
"epochs": 20 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CONFIG = { | ||
"collaborative_filtering": { | ||
"method": "matrix_factorization", # Options: matrix_factorization, user_based_cf, etc. | ||
"params": { | ||
"num_factors": 20, | ||
"learning_rate": 0.01, | ||
"regularization": 0.02, | ||
"epochs": 20 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.