BoostSRL icon indicating copy to clipboard operation
BoostSRL copied to clipboard

Error in inference with recursion

Open rodrigoazs opened this issue 7 years ago • 2 comments

Hello everyone,

I learned 10 regression trees from the same IMDB dataset provided in the Wiki. I set the target predicate as workedunder and allowed recursion.

The algorithm was able to learn, however testing its model shows the following error:

% Starting getMarginalProbabilities.
Using recursion sampling
% [ LazyGroundNthArgumentClauseIndex ]  Argument 0:  Building full index for genre/2.
% [ LazyGroundNthArgumentClauseIndex ]  Argument 1:  Building full index for movie/2.
% [ LazyGroundClauseIndex ]  Building full index for movie/2 with 286 assertions.
% [ LazyGroundClauseIndex ]  Building full index for genre/2 with 47 assertions.
% [ LazyGroundClauseIndex ]  Building full index for actor/1 with 236 assertions.
% [ LazyGroundNthArgumentClauseIndex ]  Argument 1:  Building full index for genre/2.
% [ LazyGroundClauseIndex ]  Building full index for female_gender/1 with 95 assertions.
% [ LazyGroundNthArgumentClauseIndex ]  Argument 0:  Building full index for movie/2.
% [ LazyGroundClauseIndex ]  Building full index for recursive_workedunder/2 with 14.389 assertions.
Done with -20 samples
Done with -10 samples
	Done with 0 samples
Done with 10 samples
Done with 20 samples
Done with 30 samples
Done with 40 samples
Done with 50 samples
Done with 60 samples
Done with 70 samples
Done with 80 samples
Done with 90 samples
Done with 100 samples
Done with 110 samples
Done with 120 samples
Done with 130 samples
Done with 140 samples
Done with 150 samples
Done with 160 samples
Done with 170 samples
Done with 180 samples
Done with 190 samples
% No Gibbs sampling needed during inference.

% Subsampling the negative examples for reporting.
Exception in thread "main" edu.wisc.cs.will.Utils.WILLthrownError: 
 Expected single probability value but contains distribution
	at edu.wisc.cs.will.Utils.Utils.error(Unknown Source)
	at edu.wisc.cs.will.Utils.ProbDistribution.getProbOfBeingTrue(Unknown Source)
	at edu.wisc.cs.will.Boosting.RDN.InferBoostedRDN.updateScore(Unknown Source)
	at edu.wisc.cs.will.Boosting.RDN.InferBoostedRDN.getF1ForEgs(Unknown Source)
	at edu.wisc.cs.will.Boosting.RDN.InferBoostedRDN.processExamples(Unknown Source)
	at edu.wisc.cs.will.Boosting.RDN.InferBoostedRDN.runInference(Unknown Source)
	at edu.wisc.cs.will.Boosting.RDN.RunBoostedRDN.infer(Unknown Source)
	at edu.wisc.cs.will.Boosting.Common.RunBoostedModels.inferModel(Unknown Source)
	at edu.wisc.cs.will.Boosting.RDN.RunBoostedRDN.runJob(Unknown Source)
	at edu.wisc.cs.will.Boosting.Common.RunBoostedModels.main(Unknown Source)

The same error happened when I tried different datasets and target predicates.

Thank you.

rodrigoazs avatar Dec 22 '18 15:12 rodrigoazs

Can you please send us your entire "models" folder and the data (test), including the bk file(s)? We can then inspect what the problem is. Also, do give us your full command line input, so that we can ensure everything is okay in that front.

Thanks --Mayukh

mayukhdas avatar Dec 22 '18 15:12 mayukhdas

I used the following command lines to learn and test the model:

java -jar BoostSRL.jar -l -train train/ -target workedunder -trees 10

java -jar BoostSRL.jar -i -test test/ -model train/models/ -target workedunder -trees 10

The models folder and bk file: https://www.dropbox.com/s/xmeovj55vtes0uu/IMDB.zip?dl=0

Thanks

rodrigoazs avatar Dec 28 '18 20:12 rodrigoazs