tracking-randomforest's People
Forkers
chauboldtracking-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
andpredictSamples
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!):
Add parameter for RF output filename
... and save it using its writeHDF5 method.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.