Menu

waffles_learn predict printf only labels predicted without input data

Help
maxim
2016-07-13
2016-07-17
  • maxim

    maxim - 2016-07-13

    hello there!

    it is said in usage information, that "waffles_learn predict" will print both features and predictions to stdout, but i only see one column in my arff and this is a prediction, with no features. am i doing something wrong ?

    λ waffles_learn predict model.json data_predict.arff
    @RELATION dataset

    @ATTRIBUTE my_feature real

    @DATA
    0.075
    0.04
    0
    0
    0
    0.015
    0

    data_predict.arff
    @RELATION dataset

    @ATTRIBUTE attr1 numeric
    @ATTRIBUTE attr2 numeric
    @ATTRIBUTE attr3 numeric
    @ATTRIBUTE attr4 numeric
    @ATTRIBUTE my_feature real

    @DATA
    0.918,0.233,0.491,0.648,0
    0.934,0.359,0.754,0.714,0
    0.252,0.605,0.148,0.146,0
    0.691,0.02,0.258,0.666,1
    0.037,0.897,0.304,0.146,0
    0.769,0.722,0.502,0.352,1
    0.222,0.172,0.425,0.488,0

     

    Last edit: maxim 2016-07-13
  • Mike Gashler

    Mike Gashler - 2016-07-13

    No, the documentation is wrong. I will update it.

    (If you want the features to be included, you can use
    waffles_transform mergehoriz dataset.arff data_predict.arff > both.arff
    to combine them into one file.)

     
  • maxim

    maxim - 2016-07-13

    Thank you very much, Mike!

     
  • maxim

    maxim - 2016-07-14

    tried using "waffles_transform mergehoriz" and was losing column type if it is "string". string columns are "real" in resulting dataset and contain a zero value.

    is there some workaround?

    file1.arff
    @RELATION file1

    @ATTRIBUTE id string

    @DATA
    "8560734"

    file2.arff
    @RELATION file2

    @ATTRIBUTE is_winner real

    @DATA
    0.285

    λ waffles_transform mergehoriz file1.arff file2.arff
    @RELATION Untitled

    @ATTRIBUTE id real
    @ATTRIBUTE is_winner real

    @DATA
    0,0.285

     
  • Mike Gashler

    Mike Gashler - 2016-07-14

    Unfortunately, I never finished adding support for string attributes to my GMatrix class, and I don't know of any work-around that would be simpler than adding this functionality to the GMatrix class. Sorry.

     
  • maxim

    maxim - 2016-07-15

    thanks for your answer, Mike!

    i made some changes, by converting string to integer, but still have issues. this time with "waffles_transform export". is this as it supposed to be - 8560734 changed to 8.56073e+006 ?

    i can live with scientific format, but it's obviously losing a digit:

    file3.arff
    @RELATION Untitled

    @ATTRIBUTE id numeric
    @ATTRIBUTE is_winner real

    @DATA
    8560734,0.285

    λ waffles_transform export file3.arff
    8.56073e+006,0.285

     
  • Mike Gashler

    Mike Gashler - 2016-07-16

    Thanks for pointing this out! It was using the default C++ stream precision, which is horrible. I changed it to use 14 digits by default and added a switch so you can specify the desired precision if you want more or less precision.

     
  • maxim

    maxim - 2016-07-17

    That's great, Mike! Thank you very much!

     

Anonymous
Anonymous

Add attachments
Cancel