ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/train.py
(Generate patch)

Comparing UserCode/VHbb/python/train.py (file contents):
Revision 1.24 by bortigno, Wed Mar 20 16:16:30 2013 UTC vs.
Revision 1.25 by bortigno, Wed Mar 20 23:20:43 2013 UTC

# Line 231 | Line 231 | print ks_signal
231   print '@LOG: Kolmogorov test on background'
232   print ks_bkg
233  
234 < #update the database
234 > #!! update the database
235   import sqlite3 as lite
236   con = lite.connect(MVAdir+'Trainings.db',timeout=10000) #timeout in milliseconds. default 5 sec
237   with con: # here DB is locked
238          cur = con.cursor()
239          cur.execute("create table if not exists trainings (Roc_integral real, Separation real, Significance real, Ks_signal real, Ks_background real, Roc_integral_train real, Separation_train real, MVASettings text)");
240          cur.execute("insert into trainings values(?,?,?,?,?,?,?,?)",(roc_integral_test,separation_test,significance,ks_signal,ks_bkg,roc_integral_train,separation_train,MVAsettings));
241 < #here is unlocked
241 > #!! here is unlocked
242 >
243 > #!! Close the output file to avoid memory leak
244 > output.Close()
245  
246  
247   #WRITE INFOFILE

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines