Ejemplo n.º 1
0
    social_TOP30_LASSO.getFuncs(),
    wm_TOP30_LASSO.getFuncs()
]

# NL
import allExpressions_NL_EMOTION as emotion_NL
import allExpressions_NL_GAMBLING as gambling_NL
import allExpressions_NL_LANGUAGE as language_NL
import allExpressions_NL_MOTOR as motor_NL
import allExpressions_NL_RELATIONAL as relational_NL
import allExpressions_NL_SOCIAL as social_NL
import allExpressions_NL_WM as wm_NL

functions_NL = [
    emotion_NL.getFuncs(),
    gambling_NL.getFuncs(),
    language_NL.getFuncs(),
    motor_NL.getFuncs(),
    relational_NL.getFuncs(),
    social_NL.getFuncs(),
    wm_NL.getFuncs()
]


def calcFunctionError(f, data):
    allErrors = []
    for l in data:
        try:
            allErrors.append(abs(l[-1] - f(*l)))
        except Exception:
            allErrors.append(float('nan'))
import bestExpressions_L_TOP30_RELATIONAL_LASSO_1 as relational_TOP30_LASSO
import bestExpressions_L_TOP30_SOCIAL_LASSO_1 as social_TOP30_LASSO
import bestExpressions_L_TOP30_WM_LASSO_1 as wm_TOP30_LASSO

functions_TOP30_LASSO = [emotion_TOP30_LASSO.getFuncs(), gambling_TOP30_LASSO.getFuncs(), language_TOP30_LASSO.getFuncs(), motor_TOP30_LASSO.getFuncs(), relational_TOP30_LASSO.getFuncs(), social_TOP30_LASSO.getFuncs(), wm_TOP30_LASSO.getFuncs()]

# NL
import allExpressions_NL_EMOTION as emotion_NL
import allExpressions_NL_GAMBLING as gambling_NL
import allExpressions_NL_LANGUAGE as language_NL
import allExpressions_NL_MOTOR as motor_NL		
import allExpressions_NL_RELATIONAL as relational_NL
import allExpressions_NL_SOCIAL as social_NL
import allExpressions_NL_WM as wm_NL

functions_NL = [emotion_NL.getFuncs(), gambling_NL.getFuncs(), language_NL.getFuncs(), motor_NL.getFuncs(), relational_NL.getFuncs(), social_NL.getFuncs(), wm_NL.getFuncs()]


def calcFunctionError(f, data):
	allErrors = []
	for l in data:
		try:
			allErrors.append(abs(l[-1] - f(*l)))
		except Exception:
			allErrors.append(float('nan'))
		if allErrors[-1] > 100:
			del allErrors[-1]
	return np.nanmean(allErrors)


tasks = ["EMOTION", "GAMBLING", "LANGUAGE", "MOTOR", "RELATIONAL", "SOCIAL", "WM"]