Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Back ASP to work
  • Loading branch information
lisitsyn committed Aug 23, 2011
1 parent ac212b0 commit 7e47856
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions applications/asp/signal_detectors.py
Expand Up @@ -20,8 +20,7 @@
class svm_splice_model(object):
def __init__(self, order, traindat, alphas, b, (window_left,offset,window_right), consensus):

f=StringCharFeatures(DNA)
f.set_string_features(traindat)
f=StringCharFeatures(traindat,DNA)
wd_kernel = WeightedDegreeStringKernel(f,f, int(order))
wd_kernel.io.set_target_to_stderr()

Expand Down Expand Up @@ -75,11 +74,10 @@ def get_predictions_from_seqdict(self, seqdic, site):
s=sequence[i-self.window_left:i+self.window_right+2]
testdat.append(s)

t=StringCharFeatures(DNA)
t.set_string_features(testdat)
t=StringCharFeatures(testdat,DNA)

self.wd_kernel.init(self.traindat, t)
l=self.svm.classify().get_labels()
l=self.svm.apply().get_labels()
sys.stderr.write("\n...done...\n")

k=0
Expand Down

0 comments on commit 7e47856

Please sign in to comment.