User Profile

Collapse

Profile Sidebar

Collapse
kaushik1221
kaushik1221
Last Activity: Jun 16 '10, 06:36 AM
Joined: May 24 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kaushik1221
    started a topic can this code be further optimizzed??

    can this code be further optimizzed??

    i understand that the code given below will not be compltely understood unless i explain my whole of previous and next lines of code.
    But this is part of the code which is causing so much of delay in my project and want to optimize this.
    i want to know which code part is faulty and how could this be replaced.
    i guess,few can say that use of this function is heavy compared and other ligher method are available to do this work...
    See more | Go to post

  • format of the Question will be such as segment_size <.45,or like ph.name is a;

    format of feature will be
    num segment_size pitch width ph.name
    1 .5 34 55 a
    2 .30 44 22 c etc

    i am new to python so i am looking for code..i am able to visualize but cant write the code...
    please help...
    give me the entire code for traversing...
    See more | Go to post

    Leave a comment:


  • hello,
    how to traverse a binary decision tree. given a tree,i want know how can we travesre from root to required leaf the feature of the required leaf are given in an dictionary form assume and have to traverse from root to leaf answering the questions at each node with the details given in feature list.. the decision tree node has format ((question)(lef t tree)(right tree)) while traversing it should answer question at each node and an choose...
    See more | Go to post

    Leave a comment:


  • The structure is pretty much the same what is told you.
    for normal node:((Question )(left node)(right node))
    for leaf(content).. you may see in the sample where there are two separate sets with only values and no question in between within some braces(((( ))))
    Please dont give much stress on the structure..
    Help me in building the decision tree,which will parse the information and display the contents of leaf nodes.....
    See more | Go to post

    Leave a comment:


  • ya trying to get a better way of understanding the structure my self and for giving good explanation...w ill get back in some time...thanks for giving supports and confidence
    See more | Go to post

    Leave a comment:


  • Hey,sorry its was a common mistake made by both of us..I forgot to mention that the leaf node will have different format.as there will be no question in it.and only list to stored..i.e the reason we need to check everytime while parsing whether it is leaf node or not..the last value which does not start with an opening left parenthesis is of no use to me and can be ignored..
    In the sample given the information is in the format of ( X Y)co ordinates...
    See more | Go to post

    Leave a comment:


  • Basically,assum e that there are 10,000 toys and there is need for classifying them and there are different question need to be answers to categories them,so that each leaf has just around 20 toys of one type..
    my aim is given a toy along with its few feature which will help in categorizing it,the computer should parse through the decision tree build for 10,000 toys and give a result only the leaf node contents for the given toy category inputed...
    See more | Go to post

    Leave a comment:


  • I am working on speech synthesis.In this i have a large number of pronunciation for each phone i.e alphabet and need to classify them according to few feature such as segment size(int) and alphabet itself(string) into a smaller set suitable for a particular context. For this purpose,i have decided to use decision tree for classification. the data to be parsed is in the S expression format.eg:((que stion)(LEFTNODE )(RIGHTNODE)).

    example...
    See more | Go to post

    Leave a comment:


  • Code:
    import sys
    
    def _gen_tokens(file):
      for line in file:
        line_len = len(line)
        left = 0
    
        while left < line_len:
          c = line[left]
    
          if c.isspace():
            left += 1
          elif c in '()':
            yield c
            left += 1
    
          else:
            right = left + 1
            while right < line_len:
              c =
    ...
    See more | Go to post
    Last edited by bvdet; May 24 '10, 02:19 PM. Reason: Please use code tags when posting code!

    Leave a comment:


  • how to parse a S expression and build an binary decision tree?

    I want to know how can we parse a string with braces of the form((Question) (Left_Node)(rig ht_node)). The "question" for example will be of the form if segment size < 1.5,then choose left node,else right.The question can be a dictionary with a key and a value.Left and right node represent a complete left or right half tree.Need to recursively parse the tree till the leaf node is reached.In this manner need to build an decision binary....
    See more | Go to post
No activity results to display
Show More
Working...