Skip to content

Instantly share code, notes, and snippets.

@GaelVaroquaux
GaelVaroquaux / mutual_info.py
Last active June 18, 2023 12:25
Estimating entropy and mutual information with scikit-learn: visit https://github.com/mutualinfo/mutual_info
'''
Non-parametric computation of entropy and mutual-information
Adapted by G Varoquaux for code created by R Brette, itself
from several papers (see in the code).
This code is maintained at https://github.com/mutualinfo/mutual_info
Please download the latest code there, to have improvements and
bug fixes.
@emuccino
emuccino / active_learning_mnist.py
Last active September 7, 2021 10:42
Active Learning for Fast Data Set Labeling
import numpy as np
from numpy.random import choice, normal
np.random.seed(8)
from tensorflow import set_random_seed
set_random_seed(8)
from tensorflow.python.keras.layers import Input, BatchNormalization,Conv2D, MaxPooling2D
from tensorflow.python.keras.layers import Dropout, Reshape
from tensorflow.python.keras.layers import Dense, Flatten
from tensorflow.python.keras.models import Model
@isentropic
isentropic / histogram2d.py
Last active January 7, 2022 13:50
Tensorflow histogram2d (Simple implementation)
import tensorflow as tf
@tf.function
def get2dHistogram(x, y,
value_range,
nbins=100,
dtype=tf.dtypes.int32):
"""
Bins x, y coordinates of points onto simple square 2d histogram
Given the tensor x and y:
@akhileshravi
akhileshravi / Active_Learning.ipynb
Created May 26, 2020 16:13
Active Learning in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.