Skip to main content

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:

Metadata

Release files for rgmining-amazon-dataset 0.5.0.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rgmining-amazon-dataset 0.5.0.post1
File Size Uploaded
rgmining-amazon-dataset-0.5.0.post1.tar.gz 54.9 kB Details

Release files / rgmining-amazon-dataset-0.5.0.post1.tar.gz

Download URL rgmining-amazon-dataset-0.5.0.post1.tar.gz
Size 54.9 kB
Tags Source
SHA-256 checksum
How to use checksums
90f5584f922438a128b4301d16ff2c550420fd1248d5e5afe10c04616f158b82
BLAKE2b-256 checksum
How to use checksums
dc93ae7358b073a44e030db4d42e02664869680a50187680b5dff3b9a0a90fbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.5.1

1 release file

This release

0.5.0.post1 This release

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page