Giter Club home page Giter Club logo

tracking-randomforest's People

Contributors

chaubold avatar letip avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

chaubold

tracking-randomforest's Issues

Split up the functionality into RF and data handling

Please create a class TransitionClassifier that:

  • holds a list of positive and negative examples and their features
  • has a method addSample(featuresA, featuresB, label), where A and B denote the source and target object
  • has a method train()
  • has a method predictSample(featuresA, featuresB)
  • bonus task: add methods addSamples and predictSamples for batches of features

Then, create a trainFromGT script (pretty much the same as RF-function, but using the new TransitionClassifier), that loads a dataset, sets up the TransitionClassifier, trains it, and saves the random forest to disk.

Evaluate Classifier Performance

We want to know how much better the transition classifier does with respect to the pure-distance based computation of a "transition probability".

For this, predict the probabilities (add a predictProbability method to the TransitionClassifier) for all validation samples using the trained random forest. Now threshold the probabilities p at some threshold t in [0,1]: e.g. when t=0.3, then every sample with a probability p>t for being a good transition will be classified as positive, otherwise negative. (The Random Forest's predictLabel method does this with t=0.5.)

Do the same with transition probabilities derived from distances as follows:

import numpy as np

def distanceToProbability(distance, transitionParameter=5.0):
    np.exp(-1.0 * dist / transitionParameter)

Then compute precision, recall, and f-measure for each threshold and plot a graph that looks roughly like the following (curves are made up!):
img_20151210_115043

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.