Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Tree Data structure

 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am having file in below format. I need to read this file and create a tree structure. I tried its not working as expected. Can you please let me know better approach/api to do it. Thanks in advance.

If (feature 3 in {1.0})
Predict: 0.0
Else (feature 3 not in {1.0})
If (feature 2 in {1.0})
If (feature 1 <= 3.0)
Predict: 0.0
Else (feature 1 > 3.0)
If (feature 1 <= 4.0)
If (feature 5 in {1.0})
Predict: 0.0
Else (feature 5 not in {1.0})
Predict: 1.0
Else (feature 1 > 4.0)
Predict: 1.0
Else (feature 2 not in {1.0})
Predict: 1.0

Regards,
Arul.
 
Sheriff
Posts: 17139
298
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Arulanand Dayalan wrote:I tried its not working as expected.


Please refer to the following links:

It Doesn't Work is Useless so please, Tell The Details
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Obviously the first step will be to read lines and parse the significant parts - how far have you gotten with this?
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic