def x_operator(field, regressors): new_field = copy.deepcopy(field) if derivative_order > 0: new_field = PolyD({'t': derivative_order}) * new_field new_field.append(regressors) if rational: new_field.append(new_field.__rtruediv__(1.0)) new_field = Poly(polynomial_order) * new_field return new_field
def x_operator(field, regressors): 'field = [M, C]' new_field = copy.deepcopy(field) new_field = PolyD({'t': target_derivative_order - 1}) * new_field "[M, C, M', C', M'', C'' ...]" if rational: new_field.append(new_field.__rtruediv__(1.0)) new_field = Poly(polynomial_order=polynomial_order) * new_field "[1, M, C, M', C', M'', C'' ..., MC, MM'', MCM'...]" return new_field