Menu

Can binary and real features be used together

Help
2009-09-06
2013-04-11
  • yang yulian

    yang yulian - 2009-09-06

    Hi, everybody.

    According the introduction of maxent-2.5.2, it could process both binary and real data, via the option of -real.

    but If I have both binary and real data in the same event, how could I use them? or do I have to transfer the binary data into real or the real data to binary?

    Your answers will be greatly appreciated, thanks a lot

     
    • Thomas Morton

      Thomas Morton - 2009-09-06

      Hi,
         Yes they can.  I'm not sure how you are creating your events but in RealValueFileEventStream binary events look like "name=1.2".  Binary event don't have a value at the end.  A binary event is just like a real-valued event with a value of 1.0. 

      Hope this helps...Tom

       
    • yang yulian

      yang yulian - 2009-09-06

      hi, Tom:

      My event are like this: "time=2.5 sim=0.6 mus=true sil=false".

      It seems I can not employ this event directly to train the model.

      Do you mean that I can change this event into the form like "time=2.5 sim=0.6 mus", and if there is anotoher event with both 'mus' and 'sil' true, the event will be changed to be "time=2.5 sim=0.6 mus sil"?

      Looking forward to your reply, thank you;)

       
      • Thomas Morton

        Thomas Morton - 2009-09-06

        Hi,
           The features you have will work as is with the RealValueFileEventStream.  I would recommend however that you change your non-real-valued feature to a slightly different format.  As they are the code will try and turn true and false into a float, generate an exception, catch that exception and treat them as binary features.  With the "=" sign if won't try to make a float out of the right-hand-side. 

        Hope this helps...Tom

         

Log in to post a comment.