Giter Site home page Giter Site logo

peer-object-matcher's Introduction

Peer Object Matcher

Author: Jeff Erickson <[email protected]>

Date: 2016-03-25

Overview

Use to match objects (peer objects) based on categorical and continuous data. First, the objects are matched exactly based on their categorical data, then they are matched within each categorical group based on the Euclidean distance of their continuous data.

The input should be of the following form:

object_id, categorical_data, no_match_groups, cont_point_1, cont_point_2, ..., cont_point_n

with one object per line. Leaving no_match_group as a blank field will cause all objects to be compared within the categorical group. A sample input file, test_data/sample_input_data.csv, is provided for testing.

The output will be:

object_id, peer_object_id_1, peer_object_id_2, ..., peer_object_id_m

Categorical Data

The categorical data can be anything. Grouping will be done on the unique values of this field. This can be a group label (group1, group2, etc.), concatenated categorical fields (x:y where x and y are different categorical flags), etc. While any number of data can be used, they must be concatenated into one field.

Continuous Data

Any number of continuous dimensions can be used, as long as each object has the same number of dimensions. Objects will be matched based within their categorical groups based on the shortest distance between objects. Euclidean distance in n dimensions is used here, but other distance algorithms could be substituted.

Lag Peers

It is possible to specify a separate list of objects from which to peer. The lag file must have the same format as the input file. The objects in the lag file will be used as peers, but will not be peered themselves.

Installation

After installing Go, follow these steps:

go get github.com/jefferickson/peer-object-matcher
go install github.com/jefferickson/peer-object-matcher

Usage

$GOPATH/bin/peer-object-matcher --input /path/to/input.csv --output /path/to/output.csv

For a listing of all config flags, type:

$GOPATH/bin/peer-object-matcher --help

Python Version

See peer-object-matching for the Python prototype of this peering algorithm.

peer-object-matcher's People

Contributors

jefferickson avatar

Watchers

James Cloos avatar  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.