Parsing Text.....Model Output

hughesfleming68hughesfleming68 MemberPosts:323Unicorn
edited November 2018 inHelp

Sorry to bring this up again but I am trying to parse a small text file which is the output from a write as text operator. Could someone give me a few pointers on how to approach this? A link to a tutorial would also be very helpful.

The source is a weight table:-

23.06.2016 11:51:49 Results of ResultWriter 'Write as Text' [1]:
23.06.2016 11:51:49 1. Total number of Support Vectors: 148
Bias (offset): 0.16447

w[A-0] = -0.15679
w[B.B-0] = -0.09370
w[C-0] = -0.00203
w[D-0] = -0.01725
w[E-0] = 0.11334
w[F-0] = -0.10510
w[G-0] = 0.07406
w[H-0] = 0.11156
w[I-0] = 0.06108
w[IN-0] = 0.07957
w[J-0] = 0.20053
w[JP-0] = -0.00121
w[L-0] = 0.06061
w[M-0] = 0.17203
w[N-0] = 0.13760
w[QM-0] = 0.17374
w[V-0] = 0.07307
w[WM-0] = 0.08355

number of classes: 2
number of support vectors for class up: 74
类的支持向量数量:74

I am trying to it put into two columns with the following format and seem to be getting nowhere.

A -0.15679
B.B -0.09370

regards,

Alex

Best Answer

  • hughesfleming68hughesfleming68 MemberPosts:323Unicorn
    Solution Accepted

    I figured this out...finally. There are a couple of warnings but this works and sorts the weight table from LibSVM. There are a couple of warnings which I have not looked into that I would like some feedback on if anyone has the time to look but this is good enough for now.






    <宏观os/>














































    <运营商激活= " true "类= compatibi“排序”lity="7.1.001" expanded="true" height="82" name="Sort" width="90" x="1318" y="391">

















    MartinLiebig

Answers

  • bhupendra_patilbhupendra_patil Administrator, Employee, MemberPosts:168RM Data Scientist

    Hello@hughesfleming68(Alex)

    What operator output is that ?

    Does that operator have a "wei" port. That will be a weight port and you can then use the "Weight to Data" operator to convert it to a regular row/column table representation.

    That may be an easier way

  • hughesfleming68hughesfleming68 MemberPosts:323Unicorn

    That would certainly be an easier way and that does work if I use the mySVM Linear operator as Sebastian Land very kindly pointed out to me last week. In my case, I would rather use libsvm for this particular process and the "wei" port is not available. If there is a way to get identical output from both linear learners, I don't know about it. Ideally, I would like to use the output from a "mod" port and use an operator that is more flexible than "write as text".

    I am hoping that parsing might work but I am already anticipating problems with that. I am also looking at groovy scripting and ultimately writing an extention or modifying and existing one.

    This would not be a big deal if it were one text file but I am generating more than 20 a day and then slicing them up the old fashioned way with a pen and paper. That 20 could easily become 40 or 50 so am willing to spend some time on this.

    Lastly, many thanks to the Rapidminer team for building and supporting such an amazing tool!

    regards,

    Alex

Sign InorRegisterto comment.