Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collaborative filtering api method is missing in library #11

Open
GelistirmeKF opened this issue Oct 17, 2022 · 2 comments
Open

Collaborative filtering api method is missing in library #11

GelistirmeKF opened this issue Oct 17, 2022 · 2 comments

Comments

@GelistirmeKF
Copy link

In Gorse, there is an option for intermediate recommendation:

Collaborative Filtering Recommender
Recommenders based on similar items and similar users require that the recommended items need to be linked with similar users or historical items of the recommended user, which limits the scope of recommended items searching.

This api is called through:
{{url}}:8088/api/intermediate/recommend/$User
{{url}}:8088/api/intermediate/recommend/$User/$Category

Could you please apply this recommendation method to gorse-js lib?

Thanks,
GKF

@GelistirmeKF
Copy link
Author

In Gorse, there is an option for intermediate recommendation:

Collaborative Filtering Recommender Recommenders based on similar items and similar users require that the recommended items need to be linked with similar users or historical items of the recommended user, which limits the scope of recommended items searching.

This api is called through: {{url}}:8088/api/intermediate/recommend/$User {{url}}:8088/api/intermediate/recommend/$User/$Category

Could you please apply this recommendation method to gorse-js lib?

Thanks, GKF

Under getRecommend function every file:

In client.d.ts file: ADD
getIntermediate(options: RecommendOptions): Promise<import("./interfaces").LatestOutput[]>;

In client.ts file ADD
getIntermediate(options: RecommendOptions) {
return getIntermediate(this.axiosClient, options);
}

In recommend.ts file ADD
export function getIntermediate(
axios: AxiosInstance,
{
userId,
category = "",
cursorOptions,
}: RecommendOptions
) {
return axios
.get<LatestOutput[], AxiosResponse<LatestOutput[]>>(/intermediate/recommend/${userId}/${category}, {
params: cursorOptions,
})
.then(({ data }) => {
return data;
})
.catch((exception) => {
const { response } = exception;
return Promise.reject(new GorseException(response.status, response.data));
});
}

@zhenghaoz
Copy link
Contributor

Actually, this API should be used since it never remove read items. And it might be removed in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants