GithubHelp home page GithubHelp logo

density_ranking's Introduction

Density Ranking

Analyzing data using density ranking.

  • Paper reference:
    • Chen, Yen-Chi, and Adrian Dobra. "Measuring Human Activity Spaces With Density Ranking Based on GPS Data." arXiv preprint arXiv:1708.05017 (2017).
    • Chen, Yen-Chi. "Generalized Cluster Trees and Singular Measures." arXiv preprint arXiv:1611.02762 (2016).
  • Maintianer: [email protected]
  • DR.R: the main script for running the program.
  • DR_demo.R: an example for applying DR method to a dataset.

To try this script, please execute the programs in DR_demo.R. Note that you need to download the dataset from https://archive.ics.uci.edu/ml/datasets/GPS+Trajectories before implementing DR_demo.R.

DR.R

Here is a description for the main function.

DR

DR = function(data, h, kernel="Gaussian", xlim=NULL, ylim=NULL, CL_lev = NULL, n_res=201, n_tg=100, ...)

  • Density ranking analysis for 2D datasets (GPS).
  • Inputs:
    • data: Input 2D data matrix.
    • h: Smoothing parameter.
    • kernel: kernel function, choosing from "Gaussian", "uniform", and "quartic". Default is Gaussian kernel.
    • xlim: The range of first variable.
    • ylim: The range of second variable.
    • CL_lev: The levels for contours lines. If not specify, it will automatically choose 0.05, 0.10, ..., 0.95 as the levels.
    • n_res: The resolution of grids. 201 means a 201 by 201 matrix over the range of xlim and ylim.
    • n_tg: The levels for evaluating the mass-volume curve, Betti number, and persistence curves.
  • Outputs:
    • The density ranking analysis result; a list consisting of
      • h: The smoothing bandwidth.
      • x_grid: The grid point for the first variable.
      • y_grid: The grid point for the second variable.
      • gr_alpha: The density ranking value at each grid point.
      • data_alpha: The density ranking value at each data point.
      • CL_lev: The contour levels.
      • CL: A list of contour lines corresponding to CL_lev.
      • persistent: The persistent diagram of density ranking.
      • clevel: The levels where the mass-volume, Betti number, and persistence curves are evaluated.
      • Mcurve: The value of the mass-volume curve evaluated at clevel.
      • Bcurve: The value of the Betti number curve evaluated at clevel.
      • Pcurve: The value of the persistence curve evaluated at clevel.

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.