Skip to main content

An Amazon dataset for Review Graph Mining Project

Project description

GPLv3 Build Status Release PyPi

Logo

For the Review Graph Mining project, this package provides a loader of the Six Categories of Amazon Product Reviews dataset provided by Dr. Wang.

Installation

Use pip to install this package.

$ pip install --upgrade rgmining-amazon-dataset

Note that this installation will download a big data file from the original web site.

Usage

This package provides module amazon and this module provides function load. The load function takes a graph object which implements the graph interface defined in Review Graph Mining project. The funciton load also takes an optional argument, a list of categories. If this argument is given, only reviews for products which belong to the given categories will be loaded.

For example, the following code constructs a graph object provides the FRAUDAR algorithm, loads the Amazon dataset, runs the algorithm, and then outputs names of anomalous reviewers. Since this dataset consists of huge reviews, loading may take long time.

import fraudar
import amazon

# Construct a graph and load the dataset.
graph = fraudar.ReviewGraph()
amazon.load(graph)

# Run the analyzing algorithm.
graph.update()

# Print names of reviewers who are judged as anomalous.
for r in graph.reviewers:
  if r.anomalous_score == 1:
    print r.name

# The number of reviewers the dataset has: -> 634295.
len(graph.reviewers)

# The number of reviewers judged as anomalous: -> 91.
len([r for r in graph.reviewers if r.anomalous_score == 1])

Note that you may need to install the FRAUDAR algorithm for the Review Mining Project by pip install rgmining-fraudar.

License

This software is released under The GNU General Public License Version 3, see COPYING for more detail.

The authors of the Trip Advisor dataset, which this software imports, requires to cite the following papers when you publish research papers using this package:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rgmining-amazon-dataset-0.5.1.tar.gz (56.2 kB view details)

Uploaded Source

File details

Details for the file rgmining-amazon-dataset-0.5.1.tar.gz.

File metadata

File hashes

Hashes for rgmining-amazon-dataset-0.5.1.tar.gz
Algorithm Hash digest
SHA256 9d2fc5bf16816f4838cba437b4cae0c623472c3fab75aa09326463b15269647c
MD5 1542d55f386fb4f165b9bd5e4b75577f
BLAKE2b-256 026d82602dcf7f0281385e89b2236f05c665fb4ab693124c582d35f02a3b0609

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page