GithubHelp home page GithubHelp logo

mjl68 / amazon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rgmining/amazon

0.0 2.0 0.0 1.74 MB

Amazon Dataset Loader

Home Page: https://rgmining.github.io/amazon/

License: GNU General Public License v3.0

Python 100.00%

amazon's Introduction

Amazon Dataset Loader

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:

amazon's People

Contributors

jkawamoto avatar

Watchers

James Cloos avatar Mick avatar

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.