Giter Site home page Giter Site logo

poi-and-taxi-regression's Introduction

poi-and-taxi-regression

data processing

  • get the data in arrive_point_array.npy and shanghai_poi.xlsx.

  • divide Shanghai map into several regions which have the same area.

  • for each region, construct two vectors: the first vector have 25 dimensions corresponding to 25 types of poi. For any dimension, the number of that dimension refers to the number of that kind of poi in this region; the second vector has 24 dimensions corresponding to the 24 hours of a day. For any dimension, the number of that dimension refers to the number of taxis reaching this region during this certain period of time.

  • We integrate all the "first vectors" to form the matrix poi_data, and integrate all the "second vectors" to form the matrix taxi_data.

  • (Note: the indices of poi_data and taxi_data correspond to each other, i.e. poi_data[i] and taxi_data[i] are from the same region. Therefore, poi_data.shape[0] == taxi_data[0])
    All the data we use are in the files poi_data.npy, taxi_data.npy(for regression) and tagz_and_num_match.txt(for further analysis).

regression

  • We tried linear model and XGBoost model.
  • Both in linear model and XGBoost model, we found that when the side length of each region is 3 km, the model predicts best.
  • We measured the importance of each dimension of poi_vector to judge which kind of poi influence the taxi_data more.

relevance analysis

  • In this part, we don't care about prediction ability of the model. Thus, we no longer divide the dataset into training set and test set.
  • We use linear model and necessarily, polynomial model to analyze how poi_data determines taxi_data.
  • We've found that: 1.The bigger the region, the linear model fits better. 2.Considering regions without any taxi or not has little influence on this part. 3.The linear model fits worse on the 4th, 5th, 6th and 7th dimension of taxi_data, compared with other dimensions. We can use polynomial model to solve this problem.

poi-and-taxi-regression's People

Contributors

zhj2022 avatar ceslander avatar

Watchers

 avatar

Forkers

ceslander

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.