#NEWLINE# def __init__( self , settings ) : #NEWLINE# #INDENT# self . paramsToVary = settings . paramsToVary #NEWLINE# self . numPrincipleComponents = NUM_PRINCIPLE_COMPONENTS #NEWLINE# print ( settings . initDatasetFile ) #NEWLINE# self . shapeModeler = ShapeModeler ( init_filename = settings . initDatasetFile , update_filenames = settings . updateDatasetFiles , param_filename = settings . paramFile , num_principle_components = self . numPrincipleComponents ) #NEWLINE# self . bounds = settings . initialBounds #NEWLINE# for i in range ( len ( self . paramsToVary ) ) : #NEWLINE# #INDENT# parameterVariances = self . shapeModeler . getParameterVariances ( ) #NEWLINE# if ( numpy . isnan ( settings . initialBounds [ ( i , 0 ) ] ) or numpy . isnan ( settings . initialBounds [ ( i , 1 ) ] ) ) : #NEWLINE# #INDENT# boundsFromStdDevMultiples = ( numpy . array ( settings . initialBounds_stdDevMultiples [ i , : ] ) * parameterVariances [ ( settings . paramsToVary [ i ] - 1 ) ] ) #NEWLINE# if numpy . isnan ( settings . initialBounds [ ( i , 0 ) ] ) : #NEWLINE# #INDENT# self . bounds [ ( i , 0 ) ] = boundsFromStdDevMultiples [ 0 ] #NEWLINE# #UNINDENT# if numpy . isnan ( settings . initialBounds [ ( i , 1 ) ] ) : #NEWLINE# #INDENT# self . bounds [ ( i , 1 ) ] = boundsFromStdDevMultiples [ 1 ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . doGroupwiseComparison = settings . doGroupwiseComparison #NEWLINE# self . shape_learning = settings . shape_learning #NEWLINE# self . minParamDiff = settings . minParamDiff #NEWLINE# self . initialParamValue = settings . initialParamValue #NEWLINE# self . params = numpy . zeros ( ( self . numPrincipleComponents , 1 ) ) #NEWLINE# for i in range ( self . numPrincipleComponents ) : #NEWLINE# #INDENT# self . params [ i ] [ 0 ] = ( - self . initialParamValue [ i ] ) #NEWLINE# #UNINDENT# self . initialBounds = deepcopy ( self . bounds ) #NEWLINE# self . converged = False #NEWLINE# self . numIters = 0 #NEWLINE# self . numItersConverged = 0