+ changed interface for decoded plif features -> directly access double array
[qpalma.git] / python / set_param_palma.py
index 2859d2d..694eb2e 100644 (file)
@@ -62,7 +62,8 @@ def set_param_palma(param, train_with_intronlengthinformation,\
    donSP       = Configuration.numDonSuppPoints
    accSP       = Configuration.numAccSuppPoints
    lengthSP    = Configuration.numLengthSuppPoints
-   mmatrixSP   = Configuration.sizeMMatrix
+   mmatrixSP   = Configuration.sizeMatchmatrix[0]\
+   *Configuration.sizeMatchmatrix[1]
    totalQualSP = Configuration.totalQualSuppPoints
 
    ####################
@@ -120,15 +121,15 @@ def set_param_palma(param, train_with_intronlengthinformation,\
    ####################
    for idx in range(Configuration.numQualPlifs):
       currentPlif = Plf()
-      currentPlif.limits    = linspace(min_svm_score,max_svm_score,Configuration.numQualSuppPoints) 
+      currentPlif.limits    = linspace(Configuration.min_qual,Configuration.max_qual,Configuration.numQualSuppPoints) 
       begin                 = lengthSP+donSP+accSP+mmatrixSP+(idx*Configuration.numQualSuppPoints)
       end                   = lengthSP+donSP+accSP+mmatrixSP+((idx+1)*Configuration.numQualSuppPoints)
+      print begin,end
       currentPlif.penalties = param[begin:end].flatten().tolist()[0]
       currentPlif.transform = '' 
       currentPlif.name      = 'q' 
-      currentPlif.max_len   = 100  
-      currentPlif.min_len   = -100  
-
+      currentPlif.max_len   = Configuration.max_qual 
+      currentPlif.min_len   = Configuration.min_qual
       qualityPlifs[idx] = currentPlif
 
    return h,d,a,mmatrix,qualityPlifs