A wrapper of Fraudar algorithm for the review graph mining project.
The Fraudar has been introduced by Bryan Hooi, et al. in ACM SIGKDD 2016 Conference on Knowledge Discovery & Data Mining (KDD 2016).
aveDegreecomputes average degree on a matrix,
sqrtWeightedAveDegreecomputes square-weighted average degree on a matrix,
logWeightedAveDegreecomputes logarithm-weighted average degree on a matrix.
ReviewGraph takes keyword argument
algo to be set the sub algorithm to be used.
Provide a review graph which runs Fraudar algorithm.
A node type representing a product.
ReviewGraph.new_product()to create a new product object instead of using this constructor directory.
- graph – graph object this product belongs to.
- name – name of this product.
name of this product.
summary of ratings given to this product.
Summary of ratings given to this product.
ReviewGraph(blocks=1, algo=<function logWeightedAveDegree>)¶
ReviewGraph is a simple bipartite graph representing review relation.
collection of reviewers.
collection of products.
dictionaly of which key is a product and value is another dictionaly of which key is a reviewer and value is a rating from the reviewer to the product.
add_review(reviewer, product, rating, _time=None)¶
Add a review from a reviewer to a product.
- reviewer – reviewer who posts the review.
- product – product which receives the review.
- rating – the review score.
added review score.
Create a new product.
Parameters: name – name of the new product. Returns: a new product object.
Create a new reviewer.
Parameters: name – name of the new reviewer. Returns: a new reviewer object.
Update anomalous scores by running a greedy algorithm.
Reviewer(graph, name, anomalous_score=0)¶
A node type representing a reviewer.
ReviewGraph.new_reviewer()to create a new reviewer object instead of using this constructor directory.
- graph – graph object this reviewer belongs to.
- name – name of this reviewer.
name of this reviewer.
anomalous score of this reviewer.