Functions#

Summary#

function

class parent

truncated documentation

_calcule_gradient

Retourne le gradient d’une image sous forme d’une matrice de Point, consideres ici comme des vecteurs.

_load_image

Charge une image en différents formats.

_setup_hook

if this function is added to the module, the help automation and unit tests call it first before anything goes on …

check

Checks the library is working. It raises an exception. If you want to disable the logs:

compute_gradient

Retourne le gradient d’une image sous forme d’une matrice de Point, consideres ici comme des vecteurs.

convert_PIL2array

Convertit une image donnée sous la forme d’une image Pillow au format numpy.array.

convert_array2PIL

Convertit une image donnée sous la forme d’un array au format numpy.array.

criteria

Computes Gini, information gain, likelihood on a dataset with two features assuming the first coordinates is used to …

criteria2

Computes Gini, information gain, likelihood on a dataset with two features assuming the first coordinates is used to …

detect_segments

Détecte les segments dans une image.

download_dump

Downloads wikipedia dumps from dumps.wikimedia.org/frwiki/latest/. …

download_pageviews

Downloads wikipedia pagacount for a precise date (up to the hours), the url follows the pattern

download_titles

Downloads wikipedia titles from dumps.wikimedia.org/frwiki/latest/latest-all-titles-in-ns0.gz. …

draw_graph_graphviz

Draws a graph using Graphviz.

edges2gv

Converts a graph into a GraphViz file format.

enumerate_titles

Enumerates titles from a file.

esperance

Espérance du profit en faisant varier le nombre de poulet vendus.

exponentielle

Simule une loi exponentielle de paramètre \lambda.

f_proba_poisson_melange

Wraps function proba_poisson_melange to avoid global variable.

factorielle

Calcule x! de façon récursive.

find_maximum

Trouver le couple (nombre de poulets achetés, profit) lorsque le profit est maximum.

gram_schmidt

Applies the Gram–Schmidt process. Due to performance, …

histogramme_poisson_melange

Calcule un histogramme d’un mélange de loi de Poisson.

label_class_to_softmax_output

Converts a binary class label into a matrix with two columns of probabilities.

likelihood

Computes \sum_i y_i f(\theta (x_i - x_0)) + (1 - y_i) (1 - f(\theta (x_i - x_0))) where f(x_i) is \frac{1}{1 + e^{-x}}. …

linear_regression

Solves the linear regression problem, find \beta which minimizes \norme{y - X\beta}, based on the …

local_proba_poisson_melange

Calcule la probabilité \pr{X=i}` lorsque X suit un mélange de lois.

logistic

Computes \frac{1}{1 + e^{-x}}.

maximum

Calcule les espérances de profit pour différents nombres de poulets achetés.

norm2

Computes the square norm for all rows of a matrix.

normalize_wiki_text

Normalizes a text such as a wikipedia title.

plog2

Computes x \ln_2 x.

plot_ds

Plots a dataset, X is a dataset with two features, y contains the binary labels.

plot_gradient

Construit une image a partir de la matrice de gradient afin de pouvoir l’afficher grace au module pygame, cette …

plot_segments

Dessine les segments produits par la fonction detect_segments()

poisson

Simule une loi de Poisson de paramètre \lambda.

poisson_melange

Simule une variable selon un mélange de loi de Poisson.

proba_poisson

Calcule la probabilité \pr{X=i}` lorsque X suit une loi de Poisson de paramètre \lambda. …

profit

Calcule le profit.

random_noise_image

Construit une image blanche de taille size, noircit aléatoirement ratio x nb pixels pixels.

random_segment_image

Ajoute un segment aléatoire à une image. Génère des points le long d’un segment aléatoire.

random_set_1d

Builds a random dataset as describes in example Arbre d’indécision.

remove_diacritics

remove diacritics

run_graphviz

Run GraphViz.

streaming_gram_schmidt

Solves the linear regression problem, find \beta which minimizes \norme{y - X\beta}, based on …

streaming_gram_schmidt_update

Updates matrix P_k to produce P_{k+1} which is the matrix P in algorithm Streaming Linear Regression. …

streaming_linear_regression

Streaming algorithm to solve a linear regression. See Streaming Linear Regression.

streaming_linear_regression_gram_schmidt

Streaming algorithm to solve a linear regression with Gram-Schmidt algorithm. See Streaming Linear Regression version Gram-Schmidt. …

streaming_linear_regression_gram_schmidt_update

Updates coefficients \beta_k to produce \beta_{k+1} in Streaming Linear Regression. …

streaming_linear_regression_update

Updates coefficients \beta_k to produce \beta_{k+1} in Streaming Linear Regression. The …

tabule_queue_binom

Retourne un dictionnaire dont la clé est couple d’entiers (a,b) si t est le resultat, alors t=[(a,b)] est …

voronoi_estimation_from_lr

Determines a Voronoi diagram close to a convex partition defined by a logistic regression in n classes. M \in \mathbb{M}_{nd}