pyconstruct.models.BaseModel

class pyconstruct.models.BaseModel(domain=None, **kwargs)

Base model.

Parameters:domain (BaseDomain) – The underlying domain.

Methods

clear()
copy()
decision_function(X, Y, **kwargs) Computes the score assigned to the (x, y) by the model.
fromkeys Returns a new dict with keys from iterable and values equal to value.
get(k[,d])
items()
keys()
loss(X, Y, Y_pred, **kwargs) Computes the loss of the predictions with respect the model.
margin(X, Y, Y_pred, **kwargs) Computes the margin of the current model for the given data.
phi(X, Y, **kwargs)
pop(k[,d]) If key is not found, d is returned if given, otherwise KeyError is raised
popitem() 2-tuple; but raise KeyError if D is empty.
predict(X, *args, **kwargs) Makes a prediction based on the current model.
setdefault(k[,d])
update([E, ]**F) If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
values()

Attributes

params A dictionary of parameters of the model.