linqs / psl-examples

Various examples to showcase the functionality of PSL.
61 stars 38 forks source link

Added 7 examples in first commit and in 2nd commit updated README with paper sources and fetchData.sh with psl-examples-data as source. #10

Closed shrestabs closed 4 years ago

shrestabs commented 5 years ago

Moved all data to public/psl-examples-data and updated permissions to 664

Run logs : Cora/Citeseer: ——————— MAC: shrestabs@[~/code/expanded-psl-examples/psl-examples/cora/cli] $ ./run.sh --postgres -D log4j.threshold=INFO data file found cached, skipping download. Extracting the data tar Running PSL Weight Learning 0 [main] INFO org.linqs.psl.cli.Launcher - Running PSL CLI Version 2.2.0-SNAPSHOT-3ced4b2-dirty 173 [main] INFO org.linqs.psl.cli.Launcher - Loading data 513 [main] INFO org.linqs.psl.cli.Launcher - Data loading complete 513 [main] INFO org.linqs.psl.cli.Launcher - Loading model from cora.psl 607 [main] INFO org.linqs.psl.cli.Launcher - Model loading complete 607 [main] INFO org.linqs.psl.cli.Launcher - Starting weight learning with learner: org.linqs.psl.application.learning.weight.maxlikelihood.MaxLikelihoodMPE 1816 [main] INFO org.linqs.psl.application.learning.weight.WeightLearningApplication - Grounding out model. 3944 [main] WARN org.linqs.psl.reasoner.admm.ADMMReasoner - No feasible solution found. 68 constraints violated. 3945 [main] INFO org.linqs.psl.reasoner.admm.ADMMReasoner - Optimization completed in 233 iterations. Objective: 248.24638, Feasible: false, Primal res.: 0.061004777, Dual res.: 0.0063081705 4410 [main] WARN org.linqs.psl.reasoner.admm.ADMMReasoner - No feasible solution found. 69 constraints violated. <truncate…> 14708 [main] INFO org.linqs.psl.cli.Launcher - Weight learning complete 14708 [main] INFO org.linqs.psl.cli.Launcher - Writing learned model to cora-learned.psl Running PSL Inference 0 [main] INFO org.linqs.psl.cli.Launcher - Running PSL CLI Version 2.2.0-SNAPSHOT-3ced4b2-dirty 150 [main] INFO org.linqs.psl.cli.Launcher - Loading data 525 [main] INFO org.linqs.psl.cli.Launcher - Data loading complete 525 [main] INFO org.linqs.psl.cli.Launcher - Loading model from cora-learned.psl 621 [main] INFO org.linqs.psl.cli.Launcher - Model loading complete 621 [main] INFO org.linqs.psl.cli.Launcher - Starting inference with class: org.linqs.psl.application.inference.MPEInference 1199 [main] INFO org.linqs.psl.application.inference.MPEInference - Grounding out model. 1539 [main] INFO org.linqs.psl.application.inference.MPEInference - Grounding complete. 1680 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Beginning inference. 2796 [main] WARN org.linqs.psl.reasoner.admm.ADMMReasoner - No feasible solution found. 23 constraints violated. 2796 [main] INFO org.linqs.psl.reasoner.admm.ADMMReasoner - Optimization completed in 410 iterations. Objective: 355.97708, Feasible: false, Primal res.: 0.059847802, Dual res.: 0.0041429293 2800 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Inference complete. 2800 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Writing results to Database. 3352 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Results committed to database. 3352 [main] INFO org.linqs.psl.cli.Launcher - Inference Complete 3461 [main] INFO org.linqs.psl.cli.Launcher - Starting evaluation with class: org.linqs.psl.evaluation.statistics.ContinuousEvaluator. 4375 [main] INFO org.linqs.psl.cli.Launcher - Evaluation results for HASCAT -- MAE: 0.053381, MSE: 0.031605 4375 [main] INFO org.linqs.psl.cli.Launcher - Evaluation complete.

Yelp and lastfm : ———————— MAC: shrestabs@[~/code/expanded-psl-examples/psl-examples/yelp/cli] $ ./run.sh data file found cached, skipping download. Extracted data zip found cached, skipping extract. Running PSL Weight Learning 0 [main] INFO org.linqs.psl.cli.Launcher - Running PSL CLI Version 2.2.0-SNAPSHOT-3ced4b2-dirty 2360 [main] INFO org.linqs.psl.cli.Launcher - Loading data 65297 [main] INFO org.linqs.psl.cli.Launcher - Data loading complete 65297 [main] INFO org.linqs.psl.cli.Launcher - Loading model from yelp.psl 65454 [main] INFO org.linqs.psl.cli.Launcher - Model loading complete 65454 [main] INFO org.linqs.psl.cli.Launcher - Starting weight learning with learner: org.linqs.psl.application.learning.weight.maxlikelihood.MaxLikelihoodMPE 228207 [main] INFO org.linqs.psl.application.learning.weight.WeightLearningApplication - Grounding out model. 533746 [main] INFO org.linqs.psl.reasoner.admm.ADMMReasoner - Optimization completed in 61 iterations. Objective: 39486.273, Feasible: true, Primal res.: 0.5879401, Dual res.: 0.24860024

591569 [main] INFO org.linqs.psl.cli.Launcher - Weight learning complete 591569 [main] INFO org.linqs.psl.cli.Launcher - Writing learned model to yelp-learned.psl Running PSL Inference 0 [main] INFO org.linqs.psl.cli.Launcher - Running PSL CLI Version 2.2.0-SNAPSHOT-3ced4b2-dirty 4950 [main] INFO org.linqs.psl.cli.Launcher - Loading data 67568 [main] INFO org.linqs.psl.cli.Launcher - Data loading complete 67569 [main] INFO org.linqs.psl.cli.Launcher - Loading model from yelp-learned.psl 67675 [main] INFO org.linqs.psl.cli.Launcher - Model loading complete 67675 [main] INFO org.linqs.psl.cli.Launcher - Starting inference with class: org.linqs.psl.application.inference.MPEInference 193572 [main] INFO org.linqs.psl.application.inference.MPEInference - Grounding out model. 525110 [main] INFO org.linqs.psl.application.inference.MPEInference - Grounding complete. 526351 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Beginning inference. 527843 [main] INFO org.linqs.psl.reasoner.admm.ADMMReasoner - Optimization completed in 95 iterations. Objective: 27914.303, Feasible: true, Primal res.: 0.55856496, Dual res.: 0.18216339 527869 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Inference complete. 527869 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Writing results to Database. 537737 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Results committed to database. 537738 [main] INFO org.linqs.psl.cli.Launcher - Inference Complete 538005 [main] INFO org.linqs.psl.cli.Launcher - Starting evaluation with class: org.linqs.psl.evaluation.statistics.ContinuousEvaluator. 539645 [main] INFO org.linqs.psl.cli.Launcher - Evaluation results for RATING -- MAE: 0.183107, MSE: 0.058094 539645 [main] INFO org.linqs.psl.cli.Launcher - Evaluation complete. Stance-4forum and stance-createdebate ————————————————————— MAC: shrestabs@[~/code/expanded-psl-examples/psl-examples/stance-4forums/cli] $ ./run.sh data file found cached, skipping download. Extracted data zip found cached, skipping extract. Running PSL Weight Learning 0 [main] INFO org.linqs.psl.cli.Launcher - Running PSL CLI Version 2.2.0-SNAPSHOT-3ced4b2-dirty 220 [main] INFO org.linqs.psl.cli.Launcher - Loading data 428 [main] INFO org.linqs.psl.cli.Launcher - Data loading complete 428 [main] INFO org.linqs.psl.cli.Launcher - Loading model from stance-4forums.psl 517 [main] WARN org.linqs.psl.model.Model - Rule already added to this model, skipping add: 1.0: ( PARTICIPATES(A1, T) & DISAGREES(A1, A2) & (A1 != A2) & RESPONDS(A1, A2) & PARTICIPATES(A2, T) & ~( ISPROAUTH(A2, T) ) ) >> ISPROAUTH(A1, T) ^2 520 [main] WARN org.linqs.psl.model.Model - Rule already added to this model, skipping add: 1.0: ( (A1 != A2) & RESPONDS(A1, A2) & PARTICIPATES(A2, T) & ~( ISPROAUTH(A2, T) ) & ISPROAUTH(A1, T) ) >> DISAGREES(A1, A2) ^2 521 [main] WARN org.linqs.psl.model.Model - Rule already added to this model, skipping add: 1.0: ( PARTICIPATES(A1, T) & ISPROAUTH(A2, T) & ~( ISPROAUTH(A1, T) ) & (A1 != A2) & RESPONDS(A1, A2) ) >> DISAGREES(A1, A2) ^2 522 [main] INFO org.linqs.psl.cli.Launcher - Model loading complete 522 [main] INFO org.linqs.psl.cli.Launcher - Starting weight learning with learner: org.linqs.psl.application.learning.weight.maxlikelihood.MaxLikelihoodMPE 794 [main] INFO org.linqs.psl.application.learning.weight.WeightLearningApplication - Grounding out model. 1500 [main] INFO org.linqs.psl.reasoner.admm.ADMMReasoner - Optimization completed in 100 iterations. Objective: 2123.2217, Feasible: true, Primal res.: 294.49567, Dual res.: 6.7531796 2515 [main] INFO org.linqs.psl.cli.Launcher - Weight learning complete 2515 [main] INFO org.linqs.psl.cli.Launcher - Writing learned model to stance-4forums-learned.psl Running PSL Inference 0 [main] INFO org.linqs.psl.cli.Launcher - Running PSL CLI Version 2.2.0-SNAPSHOT-3ced4b2-dirty 220 [main] INFO org.linqs.psl.cli.Launcher - Loading data 404 [main] INFO org.linqs.psl.cli.Launcher - Data loading complete 404 [main] INFO org.linqs.psl.cli.Launcher - Loading model from stance-4forums-learned.psl 496 [main] WARN org.linqs.psl.model.Model - Rule already added to this model, skipping add: 1.1916694635892477: ( ISPROAUTH(A2, T) & (A1 != A2) & RESPONDS(A1, A2) & PARTICIPATES(A2, T) & ISPROAUTH(A1, T) ) >> ~( DISAGREES(A1, A2) ) ^2 497 [main] WARN org.linqs.psl.model.Model - Rule already added to this model, skipping add: 1.0000622284477503: ( PARTICIPATES(A1, T) & ~( ISPROAUTH(A1, T) ) & (A1 != A2) & RESPONDS(A1, A2) & PARTICIPATES(A2, T) & ~( ISPROAUTH(A2, T) ) ) >> ~( DISAGREES(A1, A2) ) ^2 497 [main] INFO org.linqs.psl.cli.Launcher - Model loading complete 498 [main] INFO org.linqs.psl.cli.Launcher - Starting inference with class: org.linqs.psl.application.inference.MPEInference 622 [main] INFO org.linqs.psl.application.inference.MPEInference - Grounding out model. 780 [main] INFO org.linqs.psl.application.inference.MPEInference - Grounding complete. 802 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Beginning inference. 1091 [main] INFO org.linqs.psl.reasoner.admm.ADMMReasoner - Optimization completed in 62 iterations. Objective: 8.5553665, Feasible: true, Primal res.: 0.0031553581, Dual res.: 0.006772859 1092 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Inference complete. 1092 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Writing results to Database. 1177 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Results committed to database. 1177 [main] INFO org.linqs.psl.cli.Launcher - Inference Complete 1197 [main] INFO org.linqs.psl.cli.Launcher - Starting evaluation with class: org.linqs.psl.evaluation.statistics.ContinuousEvaluator. 1239 [main] INFO org.linqs.psl.cli.Launcher - Evaluation results for ISPROAUTH -- MAE: 0.440913, MSE: 0.214536 1242 [main] INFO org.linqs.psl.cli.Launcher - Evaluation results for DISAGREES -- MAE: 0.376325, MSE: 0.336656 1242 [main] INFO org.linqs.psl.cli.Launcher - Evaluation complete. Epinions ———— MAC: shrestabs@[~/code/expanded-psl-examples/psl-examples/epinions/cli] $ ./run.sh data file found cached, skipping download. Extracting the data tar Running PSL Weight Learning 0 [main] INFO org.linqs.psl.cli.Launcher - Running PSL CLI Version 2.2.0-SNAPSHOT-3ced4b2-dirty 246 [main] INFO org.linqs.psl.cli.Launcher - Loading data 799 [main] INFO org.linqs.psl.cli.Launcher - Data loading complete 799 [main] INFO org.linqs.psl.cli.Launcher - Loading model from epinions.psl 913 [main] INFO org.linqs.psl.cli.Launcher - Model loading complete 913 [main] INFO org.linqs.psl.cli.Launcher - Starting weight learning with learner: org.linqs.psl.application.learning.weight.maxlikelihood.MaxLikelihoodMPE 1581 [main] INFO org.linqs.psl.application.learning.weight.WeightLearningApplication - Grounding out model. 10498 [main] INFO org.linqs.psl.reasoner.admm.ADMMReasoner - Optimization completed in 250 iterations. Objective: 488.06003, Feasible: true, Primal res.: 0.505142, Dual res.: 2.2154334E-5 29561 [main] INFO org.linqs.psl.cli.Launcher - Weight learning complete 29561 [main] INFO org.linqs.psl.cli.Launcher - Writing learned model to epinions-learned.psl Running PSL Inference 0 [main] INFO org.linqs.psl.cli.Launcher - Running PSL CLI Version 2.2.0-SNAPSHOT-3ced4b2-dirty 287 [main] INFO org.linqs.psl.cli.Launcher - Loading data 929 [main] INFO org.linqs.psl.cli.Launcher - Data loading complete 929 [main] INFO org.linqs.psl.cli.Launcher - Loading model from epinions-learned.psl 1126 [main] INFO org.linqs.psl.cli.Launcher - Model loading complete 1126 [main] INFO org.linqs.psl.cli.Launcher - Starting inference with class: org.linqs.psl.application.inference.MPEInference 2215 [main] INFO org.linqs.psl.application.inference.MPEInference - Grounding out model. 12750 [main] INFO org.linqs.psl.application.inference.MPEInference - Grounding complete. 12844 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Beginning inference. 13324 [main] INFO org.linqs.psl.reasoner.admm.ADMMReasoner - Optimization completed in 150 iterations. Objective: 468.4488, Feasible: true, Primal res.: 0.5001757, Dual res.: 9.662435E-6 13324 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Inference complete. 13324 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Writing results to Database. 13486 [main] INFO org.linqs.psl.application.inference.InferenceApplication - Results committed to database. 13486 [main] INFO org.linqs.psl.cli.Launcher - Inference Complete 13518 [main] INFO org.linqs.psl.cli.Launcher - Starting evaluation with class: org.linqs.psl.evaluation.statistics.RankingEvaluator. 13622 [main] INFO org.linqs.psl.cli.Launcher - Evaluation results for TRUSTS -- AUROC: 0.823534, Positive Class AUPRC: 0.980069, Negative Class AUPRC: 0.349668 13622 [main] INFO org.linqs.psl.cli.Launcher - Evaluation complete.