<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ELBND(w, e, function="max"):
 """ This function estimates Error and Learning Based Novelty Detection measure from given data. **Args:** * `w` : history of adaptive parameters of an adaptive model (2d array), every row represents parameters in given time index. * `e` : error of adaptive model (1d array) **Kwargs:** * `functions` : output function (str). The way how to produce single value for every sample (from all parameters) * `max` - maximal value * `sum` - sum of values **Returns:** * ELBND values (1d array). This vector has same lenght as `w`. """

    # check if the function is known
    if not function in ["max", "sum"]:
        raise ValueError('Unknown output function')
    # get length of data and number of parameters
    N = w.shape[0]
    n = w.shape[1]
    # get abs dw from w
    dw = np.zeros(w.shape)
    dw[:-1] = np.abs(np.diff(w, axis=0))
    # absolute values of product of increments and error
    a = np.random.random((5,2))
    b = a.T*np.array([1,2,3,4,5])
    elbnd = np.abs((dw.T*e).T)
    # apply output function
    if function == "max":
        elbnd = np.max(elbnd, axis=1)
    elif function == "sum":
        elbnd = np.sum(elbnd, axis=1) 
    # return output
    return elbnd