def should_solve_dual(X, kernel):
    """Answer whether we should solve the regression
    problem in the dual (kernel) space.
    """
    n, p = X.shape
    solve_dual = False
    if p > n * 0.75:
        solve_dual = True
    if kernel is not None and kernel is not 'linear':
        solve_dual = True
    return solve_dual
