scikit-learn-contrib / mimic

Licence: BSD-3-Clause license
mimic calibration

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to mimic

Stereo Vision
This program has been developed as part of a project at the University of Karlsruhe in Germany. The final purpose of the algorithm is to measure the distance to an object by combining two webcams and use them as a Stereo Camera.
Stars: ✭ 160 (+788.89%)
Mutual labels:  calibration
pre-training
Pre-Training Buys Better Robustness and Uncertainty Estimates (ICML 2019)
Stars: ✭ 90 (+400%)
Mutual labels:  calibration
SCNeRF
[ICCV21] Self-Calibrating Neural Radiance Fields
Stars: ✭ 383 (+2027.78%)
Mutual labels:  calibration
Kalibr
The Kalibr visual-inertial calibration toolbox
Stars: ✭ 2,410 (+13288.89%)
Mutual labels:  calibration
ACSC
Automatic Calibration for Non-repetitive Scanning Solid-State LiDAR and Camera Systems
Stars: ✭ 210 (+1066.67%)
Mutual labels:  calibration
calico
code for: Calibration of Asynchronous Camera Networks: CALICO
Stars: ✭ 52 (+188.89%)
Mutual labels:  calibration
Extrinsic lidar camera calibration
This is a package for extrinsic calibration between a 3D LiDAR and a camera, described in paper: Improvements to Target-Based 3D LiDAR to Camera Calibration. This package is used for Cassie Blue's 3D LiDAR semantic mapping and automation.
Stars: ✭ 149 (+727.78%)
Mutual labels:  calibration
LFToolbox
Light Field Toolbox for MATLAB
Stars: ✭ 74 (+311.11%)
Mutual labels:  calibration
UQ360
Uncertainty Quantification 360 (UQ360) is an extensible open-source toolkit that can help you estimate, communicate and use uncertainty in machine learning model predictions.
Stars: ✭ 211 (+1072.22%)
Mutual labels:  calibration
EM7180 SENtral Calibration
Get the best AHRS accuracy out of the Tlera USFS with good sensor calibration
Stars: ✭ 22 (+22.22%)
Mutual labels:  calibration
Pybotics
The Python Toolbox for Robotics
Stars: ✭ 192 (+966.67%)
Mutual labels:  calibration
Volumetriccapture
A multi-sensor capture system for free viewpoint video.
Stars: ✭ 243 (+1250%)
Mutual labels:  calibration
light-structure-from-pin-motion
This is the project page for our IJCV paper 'Light structure from pin motion: Geometric point light source calibration' by Hiroaki Santo, Michael Waechter, Wen-Yan Lin, Yusuke Sugano, and Yasuyuki Matsushita (An earlier version was presented in ECCV 2018).
Stars: ✭ 27 (+50%)
Mutual labels:  calibration
Anipose
🐜🐀🐒🚶 A toolkit for robust markerless 3D pose estimation
Stars: ✭ 162 (+800%)
Mutual labels:  calibration
vignetting calib
No description or website provided.
Stars: ✭ 41 (+127.78%)
Mutual labels:  calibration
Robot calibration
Generic calibration for robots
Stars: ✭ 154 (+755.56%)
Mutual labels:  calibration
LiDARTag
This is a package for LiDARTag, described in paper: LiDARTag: A Real-Time Fiducial Tag System for Point Clouds
Stars: ✭ 161 (+794.44%)
Mutual labels:  calibration
verified calibration
Calibration library and code for the paper: Verified Uncertainty Calibration. Ananya Kumar, Percy Liang, Tengyu Ma. NeurIPS 2019 (Spotlight).
Stars: ✭ 93 (+416.67%)
Mutual labels:  calibration
bsec bme680 linux
Read the BME680 sensor with the BSEC library on Linux (e.g. Raspberry Pi)
Stars: ✭ 78 (+333.33%)
Mutual labels:  calibration
NN calibration
Calibration of Convolutional Neural Networks
Stars: ✭ 127 (+605.56%)
Mutual labels:  calibration

Travis AppVeyor CircleCI ReadTheDocs Codecov

mimic calibration

Introduction

mimic calibration is a calibration method for binary classification model. This method was presented at NYC ML Meetup talk given by Sam Steingold, see [*].

Implementation

It requires two inputs, the probability prediction from binary classification model and the binary target (0 and 1). Here is how it is implemented

  1. Sort the probabitliy in the ascending. Merge neighbor data points into one bin until the number of positive equal to threshold positive at each bin. In this initial binning, only the last bin may have number of positive less than threshold positive.
  2. Calculate the number of positive rate at each bin. Merge neighbor two bins if nPos rate in the left bin is greater than right bin.
  3. Keep step 2. until the nPos rate in the increasing order.
  4. In this step, we have information at each bin, such as nPos rate, the avg/min/max probability. we record those informations in two places. One is boundary_table. The other is calibrated_model. boundary_table: it records probability at each bin. The default is recording the avg prob of bin. calibrated_model: it records all the information of bin, such nPos rate, the avg/min/max probability.
  5. The final step is linear interpolation.

Install:

pip install -i https://test.pypi.org/simple/ mimiccalib

Parameters:

>>> _MimicCalibration(threshold_pos, record_history)
  • threshold_pos: the number of positive in the initial binning. default = 5.
  • record_history: boolean parameter, decide if record all the mergeing of bin history. default = False.

Usage

>>> from mimic import _MimicCalibration
>>> mimicObject = _MimicCalibration(threshold_pos=5, record_history=True)
>>> # y_calib_score: probability prediction from binary classification model
>>> # y_calib: the binary target, 0 or 1.
>>> mimicObject.fit(y_calib_score, y_calib)
>>> y_mimic_calib_score = mimicObject.predict(y_calib_score)

Results: calibration evaluation.

  • calibration curve and brier score. In our testing examples, mimic and isotonic have very similar brier score. But, as number of bins increase in calibration curve, mimic calibration has more smooth behavior. It is because the calibrated probability of mimic has more continuous prediction space compared to isotonic calibration which is step function. In the following plot, brier scores are 0.1028 (mimic) and 0.1027 (isotonic).
>>> calibration_curve(y_test, y_output_score, n_bins=10)

https://github.com/pinjutien/mimic/blob/master/data/evaluation_calib_1.png

>>> calibration_curve(y_test, y_output_score, n_bins=20)

https://github.com/pinjutien/mimic/blob/master/data/evaluation_calib_2.png

The above behavior is similar in the followings cases. 1. base model = GaussianNB, LinearSVC 2. positive rate in the data = 0.5, 0.2

Comparison :mimic, isotonic and platt calibration.

https://github.com/pinjutien/mimic/blob/master/data/mimic_calib_prob.png

History of merging bins.

https://github.com/pinjutien/mimic/blob/master/data/merging_bins_history.png

Run test

>>> pytest -v --cov=mimic --pyargs mimic

Reference

[*]https://www.youtube.com/watch?v=Cg--SC76I1I
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].