Giter Site home page Giter Site logo

sar's Introduction

SAR: Smart Adaptive Recommendations

SAR is a practical, rating-free collaborative filtering algorithm for recommendations. It produces explainable results, and is usable on a wide range of problems.

This package provides the following:

  • An R interface to the Azure Product Recommendations service, a cloud implementation of SAR. It includes the ability to deploy the backend via the AzureRMR package, as well as a client frontend.

  • A standalone R implementation of SAR, for ease of experimentation and familiarisation. The core algorithm is written in C++ and makes use of multithreading and sparse matrices for speed and efficiency.

More information

A detailed description of SAR

Other SAR implementations:

sar's People

Contributors

hongooi73 avatar jreynolds01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sar's Issues

cold item modeling does not modify produced similarity matrix as desired

specifying appropriate arguments for catalog_data and catalog_formula have no impact on the returned value of sar(). The issue is an assignment in the main sar.default(). Fix inc.

To reproduce, use the following steps:

data(ms_usage)
data(ms_catalog)

## create some feature variables
ms_catalog$ms <- grepl("microsoft", ms_catalog$name, ignore.case=TRUE)
ms_catalog$surf <- grepl("surface", ms_catalog$name, ignore.case=TRUE)

## create several different SAR models
mod0 <- sar(ms_usage, support_threshold=25)
mod1 <- sar(ms_usage, support_threshold=25, catalog_data=ms_catalog, catalog_formula=f, cold_item_model=NULL)
mod2 <- sar(ms_usage, support_threshold=25, catalog_data=ms_catalog, catalog_formula=f, cold_item_model=NULL,
            cold_to_cold=TRUE)
mod3 <- sar(ms_usage, support_threshold=25, catalog_data=ms_catalog, catalog_formula=f, cold_item_model="lm")
mod4 <- sar(ms_usage, support_threshold=25, catalog_data=ms_catalog, catalog_formula=f, cold_item_model="lm",
            cold_to_cold=TRUE)

## all the similarity matrices are the same
all(mod0$sim_mat == mod1$sim_mat)
all(mod0$sim_mat == mod2$sim_mat)
all(mod0$sim_mat == mod3$sim_mat)
all(mod0$sim_mat == mod4$sim_mat)

## do one comparison by hand:
sim_onlywarm = SAR:::make_similarity(ms_usage$user, factor(ms_usage$item), ms_usage$time, 25, by_user=TRUE, similarity='jaccard')
## augment with cold items to mirror model1
f <- reformulate(names(ms_catalog)[-(1:2)])
sim_withcold1 <- SAR:::get_cold_similarity(cold_item_model=NULL, sim_matrix=sim_onlywarm, catalog_formula=f, catalog_data=ms_catalog, cold_to_cold=FALSE,
                                          similarity='jaccard')
## this is still TRUE
all(mod1$sim_mat == sim_onlywarm)
## it SHOULD be FALSE:
all(sim_withcold1 == sim_onlywarm)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.