Giter Club home page Giter Club logo

patterns's Introduction

Detect patterns in data

In this project I work with eye-tracking data (eye-movements) and compare different approaches for detecting patterns in the trajectories of the movements:

  • convert data into strings and detect patterns in strings,
  • represent data as a set of time sequences, train convolutional network and detect pattern using filters of the first conv layer.

Prerequisites

Required libraries:

numpy
pandas
keras

How to:

Prepare data

prepare_data.ipynb

→ Preprocess raw data and compute basic features for detecting patterns in trajectories:

- movement direction
- movement length

Find patterns in strings

patterns_strings.ipynb

→ Factorize features and convert factors into sequences. Find patterns in sequences and visualize them.

Find patterns using convolutional networks

patterns_conv.ipynb

→ Convert data into time sequences, train a network with 1D Convolutional layers to detect the task user is performing. Extract weights from the first layer and check what kind of patterns are detected by them.

Data and results:

The demo data is represented by eye-tracker observations of users doing some routine web-surfing tasks such as:

  • reading Wikipedia,
  • checking news,
  • searching a route on maps,
  • watching YouTube,
  • checking a social network (vk)
  • or going through Pinterest search results.

While performing the tasks, their eye-movements were recorded: x, y variables denote gaze position on a screen, time determines time from the beginning of the recording to the current observation.

Position (0, 0) means the left upper corner of the screen.

The data was cleaned: only fixations were left and observations where a blink was detected were removed.

A slice of the data:

Eye movements

Find patterns in strings

Examples of patterns, detected from strings:

Pattern 1 Pattern 2 Pattern 3

The comparison of the pattern's coverage in real and permuted data:

Coverage

Find patterns using convolutional networks

Highlighting the areas of a sequence which activates a filter in conv_1 layer:

Filter activations

Simulate data and plot heatmaps of gaze positions to understand the filter's properties (filter size equals 3):

Filter heatmaps

Plot the best stimuli for the filter from the simulated data:

Filter examples

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

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.