Ejemplo n.º 1
0
# J_r  残差のヤコビアン(m×n行列、全要素ゼロで初期化)
J_r      = np.zeros(( len( theFullPNs['f'] ), len( theFullPNs['b'] )))
J_r_next = copy.deepcopy( J_r )

# βの現在値のリスト
p = []
for b in theFullPNs['b']:
    p.append( PARAMETERS[ b ] )

# トレーニングデータを格納した辞書
target_data_dict = {}

for FullPN, ECDFileName in CURVE_DATA_DICT.items():
    aTimeCouse = ECDDataFile()
    aTimeCouse.load( os.sep.join(( CURVE_DATA_DIR.rstrip( os.sep ), ECDFileName )) )
    target_data_dict[ FullPN ] = getTargetDataPoints( aTimeCouse.getData(), T_START, T_END, T_INTERVAL )

"""
for FullPN, tc in target_data_dict.items():
    print "\n" + FullPN
    for dp in tc:
        print "{} : {}".format( dp[0], dp[1] )
"""

# --------------------------------------------------------
# (3) 反復計算
# --------------------------------------------------------

beta_prev = copy.deepcopy( beta_dict )

for i in range( MAX_GENERATION ):
Ejemplo n.º 2
0
# J_r  残差のヤコビアン(m×n行列、全要素ゼロで初期化)
J_r = np.zeros((len(theFullPNs['f']), len(theFullPNs['b'])))
J_r_next = copy.deepcopy(J_r)

# βの現在値のリスト
p = []
for b in theFullPNs['b']:
    p.append(PARAMETERS[b])

# トレーニングデータを格納した辞書
target_data_dict = {}

for FullPN, ECDFileName in CURVE_DATA_DICT.items():
    aTimeCouse = ECDDataFile()
    aTimeCouse.load(os.sep.join((CURVE_DATA_DIR.rstrip(os.sep), ECDFileName)))
    target_data_dict[FullPN] = getTargetDataPoints(aTimeCouse.getData(),
                                                   T_START, T_END, T_INTERVAL)
"""
for FullPN, tc in target_data_dict.items():
    print "\n" + FullPN
    for dp in tc:
        print "{} : {}".format( dp[0], dp[1] )
"""

# --------------------------------------------------------
# (3) 反復計算
# --------------------------------------------------------

LAMBDA = LAMBDA_0
beta_prev = copy.deepcopy(beta_dict)
S_prev = float('inf')