From: Aaron A. <aa...@cs...> - 2008-01-25 01:03:51
|
I run the example you give and I have no problems... I have the text I used below: $> cat rodrigo.train rodrigo.test rodrigo.spec neoplasia maligna de labio superior externa , c000; neoplasia maligna de labio superior borde vermellon sai , c000; neoplasia maligna de labio superior externa trastorno , c000; neoplasia maligna del labio superior area del bermellon trastorno , c000; tumor maligno de ddel borde bermellon del labio superior trastorno , c000; neoplasia maligna de labio superior externa , c000; neoplasia maligna de labio superior borde vermellon sai , c000; neoplasia maligna de labio superior externa trastorno , c000; neoplasia maligna del labio superior area del bermellon trastorno , c000; tumor maligno de ddel borde bermellon del labio superior trastorno , c000; exampleTerminator=; attributeTerminator=, maxBadExa=0 diagnostico text labels (c000,c001,c002,c003,c004,c005,c006,c009) $> ./jboost -b AdaBoost -numRounds 5 -S rodrigo I have a couple of guesses for problems: * You have "weird" line ends. Try using the most stripped down text editor you have. Or send the first 10 examples in a file (not copy and pasted into email form) * You have too many labels and JBoost is getting confused. JBoost can handle up to 32000 labels (maybe more...) and I've never actually tested the behavior if there are more than this. To answer your question: What is maxBadExa? It is just the maximum number of bad examples tolerated. Since I can't reproduce the problem, I'm not sure exactly what it is. If you post your datasets somewhere or send small version of them (10KB total or less), I may be able to help more. Aaron On Thu, 24 Jan 2008, Rodrigo Pizarro wrote: > Hi, > > i have a Exception "BadAttException" while running JBoost. > > --------------------- > iMac-de-Rodrigo-Pizarro:demo Rodri_gop$ java jboost.controller.Controller -S > diag > Fileloader adding . to path. > WARNING: configuration file jboost.config not found. Continuing... > Found diag.spec > Found diag.train > Found diag.spec > Found diag.test > Booster type: jboost.booster.AdaBoost > BadAttException: Line 0 > Multiple labels found when expecting single label: c000 > Continuing to parse example. > jboost.tokenizer.BadAttException: Multiple labels found when expecting single > label: c000 > at jboost.examples.LabelDescription.str2Att(LabelDescription.java:59) > at > jboost.tokenizer.ExampleStream.parseExampleText(ExampleStream.java:127) > at jboost.tokenizer.ExampleStream.getExample(ExampleStream.java:83) > at jboost.controller.Controller.readTrainData(Controller.java:571) > at jboost.controller.Controller.init(Controller.java:164) > at jboost.controller.Controller.<init>(Controller.java:105) > at jboost.controller.Controller.main(Controller.java:80) > BadExaException Example beginning at line 0 > Number of bad attributes in example exceeds 0 skipping rest of example. > BadAttException: Line 0 > Multiple labels found when expecting single label: c000 > Continuing to parse example. > jboost.tokenizer.BadAttException: Multiple labels found when expecting single > label: c000 > at jboost.examples.LabelDescription.str2Att(LabelDescription.java:59) > at > jboost.tokenizer.ExampleStream.parseExampleText(ExampleStream.java:127) > at jboost.tokenizer.ExampleStream.getExample(ExampleStream.java:83) > at jboost.controller.Controller.readTrainData(Controller.java:571) > at jboost.controller.Controller.init(Controller.java:164) > at jboost.controller.Controller.<init>(Controller.java:105) > at jboost.controller.Controller.main(Controller.java:80) > BadExaException Example beginning at line 0 > Number of bad attributes in example exceeds 0 skipping rest of example. > BadAttException: Line 1 > Multiple labels found when expecting single label: c000 > Continuing to parse example. > ... > -------------------------- > > The train file is like: > > neoplasia maligna de labio superior externa , c000; > neoplasia maligna de labio superior borde vermellon sai , c000; > neoplasia maligna de labio superior externa trastorno , c000; > neoplasia maligna del labio superior area del bermellon trastorno , c000; > tumor maligno de ddel borde bermellon del labio superior trastorno , c000; > ... > ... > > And the spec file is like: > > exampleTerminator=; > attributeTerminator=, > maxBadExa=2000 > > diagnostico text > labels (c000,c001,c002,c003,c004,c005,c006,c009, ... ,d487,d489) > > (it's resumed) > > I have changed the maxBadExample parametrer for some values between 0 and > 2000 and I still get similar errors. The jboost execution is fine with the > demo examples. > > What can be happening? > What means "maxBadExa" parameter? > > > Many thanks beforehand!!! > > > > Rodrigo Pizarro G. > Ingeniería Informática > Universidad de Santiago de Chile > > > > |