mlstatpy.ml.logreg#
- mlstatpy.ml.logreg.criteria(X, y)[source][source]#
Computes Gini, information gain, likelihood on a dataset with two features assuming the first coordinates is used to classify.
@param X 2D matrix @param y binary labels @return dataframe
- mlstatpy.ml.logreg.criteria2(X, y)[source][source]#
Computes Gini, information gain, likelihood on a dataset with two features assuming the first coordinates is used to classify.
@param X 2D matrix @param y binary labels @return dataframe
- mlstatpy.ml.logreg.likelihood(x, y, theta=1.0, th=0.0)[source][source]#
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}}\).
- mlstatpy.ml.logreg.plot_ds(X, y, ax=None, title=None)[source][source]#
Plots a dataset, X is a dataset with two features, y contains the binary labels.
- mlstatpy.ml.logreg.random_set_1d(n, kind)[source][source]#
Builds a random dataset as describes in example Arbre d’indécision.
@param n number of observations @param kind 2, 3, 4 (see example) @return array 2D