arsenalgear-py
A library containing general purpose Python utils.
|
Functions | |
def | plot_AMS (predictions, label_vectors, weights) |
plot_AMS More... | |
def | plotter_complex (real_part, imaginary_part, a, b, n, coefficient) |
plotter_complex More... | |
def | plot_learning_curve (estimator, title, X, y, axes=None, ylim=None, cv=None, n_jobs=None, scoring=None, train_sizes=np.linspace(0.1, 1.0, 5)) |
plot_learning_curve More... | |
def arsenalgear.plotter.plot_AMS | ( | predictions, | |
label_vectors, | |||
weights | |||
) |
plot_AMS
Function used to plot the AMS function. Args: predictions ( numpy array ): is a binary array, defined from the set of data that we're considering. label_vectors ( numpy array ): is a binary array constructed from the dataset, used for each model, that distinguishes an event between signal and background. weights ( numpy array ): it takes the weights associated to each data of my dataset.
def arsenalgear.plotter.plot_learning_curve | ( | estimator, | |
title, | |||
X, | |||
y, | |||
axes = None , |
|||
ylim = None , |
|||
cv = None , |
|||
n_jobs = None , |
|||
scoring = None , |
|||
train_sizes = np.linspace( 0.1, 1.0, 5 ) |
|||
) |
plot_learning_curve
Generate 3 plots: the test and training learning curve, the training samples vs fit times curve, the fit times vs score curve. Taken from here: https://scikit-learn.org/stable/auto_examples/model_selection/plot_learning_curve.html. Args: estimator (sklearn): An estimator instance implementing `fit` and `predict` methods which will be cloned for each validation. title (str): Title for the chart. X (numpy.array): array-like of shape (n_samples, n_features). Training vector, where ``n_samples`` is the number of samples and ``n_features`` is the number of features. y (numpy.array): array-like of shape (n_samples) or (n_samples, n_features). Target relative to ``X`` for classification or regression; axes (numpy.array, optional): array-like of shape (3,). Axes to use for plotting the curves. Defaults to None. ylim (numpy.array, optional): tuple of shape (2,). Defines minimum and maximum y-values plotted, e.g. (ymin, ymax). Defaults to None. cv (int, optional): cross-validation generator or an iterable. Determines the cross-validation splitting strategy. Possible inputs for cv are:. Defaults to None. n_jobs (int, optional): nt or None. Number of jobs to run in parallel. Defaults to None. scoring (str, optional): a str (see model evaluation documentation) or a scorer callable object / function with signature ``scorer(estimator, X, y)``.. Defaults to None. train_sizes (numpy.array, optional): array-like of shape (n_ticks,). Relative or absolute numbers of training examples that will be used to generate the learning curve.. Defaults to np.linspace( 0.1, 1.0, 5 ).
def arsenalgear.plotter.plotter_complex | ( | real_part, | |
imaginary_part, | |||
a, | |||
b, | |||
n, | |||
coefficient | |||
) |
plotter_complex
Function used to plot a given function for an index n. Args: real_part (string): mathematical real expression part. imaginary_part (string): mathematical imaginary expression part. a (any): lower integration extreme. b (any): higher integration extreme. n (int): wave function index. coefficient (any): value of the normalization coefficient. Returns: plot: the wave-function plot for the index n is returned.