Utilities

Module containing utilities which are used in the library

class mapyl.utils.PolyExp(degree)[source]
evalnum(X)[source]

Converts ndarray to poly features

class mapyl.utils.Mode[source]
mode(axis=0)[source]

A copy of scipy’s mode function

returns most common values in ndarray along with the amount of values in the indices

class mapyl.utils.Accuracy[source]
accuracy(y_hat)[source]

calculates the accuracy of the prediction (for classification tasks ONLY)

Parameters:

y (ndarray): ndarray of the correct values

y_hat (ndarray): ndarray of the predicted values

returns: float of the accuracy