@@ -244,18 +244,20 @@ def hard_test_cases(a, b):
244
244
sig = sunit * x1 [:, None ]
245
245
print ('Calculated {} yield stresses.' .format (nsamples_init ))
246
246
# train SVC with yield stress data generated from Hill flow rules
247
- C = 6 .0
248
- gamma = 2.0
249
- Fe = 0.5
250
- Ce = 0.99
251
- Nseq = 20
247
+ C = 2 .0
248
+ gamma = 2.5
249
+ Ce = 0.95
250
+ Fe = 0.1
251
+ Nseq = 25
252
252
vlevel = 0
253
- cvals = [5. , 6. , 8. ]
254
- gvals = [1. , 2. , 3. ]
253
+ cvals = [4 , 6 , 8 , 10 ] # [4, 6, 8, 10, 12, 15 ]
254
+ gvals = [0.6 , 1 , 2 , 2.5 , 3 ] # [0.6, 0.8, 1, 2, 2.5, 3 ]
255
255
256
256
mat_ml = FE .Material (name = 'ML-Hill' ) # define material
257
- mat_ml .train_SVC (C = C , gamma = gamma , Fe = Fe , Ce = Ce , Nseq = Nseq , sdata = sig ,
258
- gridsearch = True , cvals = [1. , 2. , 4. ], gvals = [0.5 , 1. , 1.5 ], verbose = vlevel )
257
+ mat_ml .dev_only = True
258
+ mat_ml .train_SVC (C = C , gamma = gamma , Fe = Fe , Ce = Ce , Nseq = Nseq , sdata = sig , extend = False ,
259
+ gridsearch = True , cvals = cvals , gvals = gvals ,
260
+ al_legacy = True , verbose = vlevel )
259
261
plot_yield_locus (mat_ml = mat_ml , mat_h = mat_h , niter = 0 )
260
262
np .savetxt ('DATA_sig_iter_0.txt' , sig )
261
263
np .savetxt ('DATA_sunit_iter_0.txt' , sunit )
@@ -270,9 +272,11 @@ def hard_test_cases(a, b):
270
272
for j in range (nmembers ):
271
273
idx = np .random .choice (np .arange (sig .shape [0 ]), int (sig .shape [0 ] * subset_percentage ), replace = False )
272
274
mat_ml = FE .Material (name = 'ML-Hill_{}' .format (j ))
275
+ mat_ml .dev_only = True
273
276
mat_ml .train_SVC (C = C , gamma = gamma , Fe = Fe , Ce = Ce , Nseq = Nseq ,
274
- sdata = sig [idx , :],
275
- gridsearch = True , cvals = cvals , gvals = gvals , verbose = vlevel )
277
+ sdata = sig [idx , :], extend = False ,
278
+ gridsearch = True , cvals = cvals , gvals = gvals ,
279
+ al_legacy = True , verbose = vlevel )
276
280
hyp_C_list .append (mat_ml .C_yf )
277
281
hyp_g_list .append (mat_ml .gam_yf )
278
282
committee .append (mat_ml )
@@ -294,9 +298,11 @@ def hard_test_cases(a, b):
294
298
sunit = np .vstack ([sunit , sunit_new ])
295
299
296
300
mat_ml = FE .Material (name = 'ML-Hill' ) # define material
301
+ mat_ml .dev_only = True
297
302
mat_ml .train_SVC (C = C , gamma = gamma , Fe = Fe , Ce = Ce , Nseq = Nseq ,
298
- sdata = sig ,
299
- gridsearch = True , cvals = cvals , gvals = gvals , verbose = vlevel )
303
+ sdata = sig , extend = False ,
304
+ gridsearch = True , cvals = cvals , gvals = gvals ,
305
+ al_legacy = True , verbose = vlevel )
300
306
301
307
# Create ML model with conventional training approach
302
308
Ntot = nsamples_init + nsamples_to_generate
0 commit comments