Decoupled Smoothing in Probabilistic Soft Logic

Overview

Decoupled Smoothing in Probabilistic Soft Logic

Experiments for "Decoupled Smoothing in Probabilistic Soft Logic".

Probabilistic Soft Logic

Probabilistic Soft Logic (PSL) is a machine learning framework for developing probabilistic models. You can find more information about PSL available at the PSL homepage and examples of PSL.

Documentation

This repository contains code to run PSL rules for one-hop method, two-hop method, and decoupled smoothing method for predicting genders in a social network. We provide links to the datasets (Facebook100) in the data sub-folder.

Obtaining the data

This repository set-up assumes that the FB100 (raw .mat files) have been acquired and are saved the data folder. Follow these steps:

  1. The Facebook100 (FB100) dataset is publicly available from the Internet Archive at https://archive.org/details/oxford-2005-facebook-matrix and other public repositories. Download the datasets.
  2. Save raw datasets in placeholder folder data. They should be in the following form: Amherst41.mat.

Set permissions

Make sure that permissions are set so you can run the run scripts:

chmod -R +x *

Reproducing results

Step 1: Generate input files

To reproduce the results, first need to generate the predicate txts, run ./generate_data.sh {school name}. It will automatically generate the files required to run the PSL models as well as the files to run the baseline model.

For example, to generate data using Amherst college as dataset, simply run ./generate_data.sh Amherst41.

Step 2: Run PSL models

Simple Exeucution

To reproduce the results of a specific PSL model, run ./run_all.sh {data} {method dir}. This will run a selected method for all random seeds at all percentages.

This takes the following positional parameters:

  • data: what datafile you would like to use
  • method dir: this is the path to the directory you'd like the run

For example, to reproduce the result for method one-hop using the Amherst college as dataset, simply run ./run_all.sh Amherst41 cli_one_hop.

Advanced Execution

If you need to get results for a more specific setting, run ./run_method.sh {data} {random seed} {precent labeled} {eval|learn} {method dir}. It runs a selected method for a specified seed for a specified percentage for either learning or evaluation.

This takes the following positional parameters:

  • data: what datafile you would like to use
  • random seed: what seed to use
  • percent labeled: what percentage of labeled data
  • {learn|eval}: specify if you're learning or evaluating
  • method dir: this is the path to the directory you'd like the run

The output will be written in the following directory: ../results/decoupled-smoothing/{eval|learn}/{method run}/{data used}/{random seed}/

The directory will contain a set of folders for the inferences found at each percent labeled, named inferred-predicates{pct labeled}. The folder will also contain the a copy of the base.data, gender.psl, files and output logs from the runs.

Step 3: Run baseline Decoupled Smoothing model

To run the baseline decoupled smoothing model, run baseline_ds.py. It will generate a csv file contains the results of the baseline model named baseline_result.csv.

Evaluation

To run the evaluation of each models, run evaluation.py, which will generate the two plots in Figure 3 in the paper.

Requirements

These experiments expect that you are running on a POSIX (Linux/Mac) system. The specific application dependencies are as follows:

  • Python3
  • Bash >= 4.0
  • PostgreSQL >= 9.5
  • Java >= 7

Citation

All of these experiments are discussed in the following paper:

@inproceedings{chen:mlg20,
    title = {Decoupled Smoothing in Probabilistic Soft Logic},
    author = {Yatong Chen and Byran Tor and Eriq Augustine and Lise Getoor},
    booktitle = {International Workshop on Mining and Learning with Graphs (MLG)},
    year = {2020},
    publisher = {MLG},
    address = {Virtual},
}
Owner
Kushal Shingote
Android Developer馃摫馃摫 iOS Apps馃摫馃摫 Swift | Xcode | SwiftUI iOS Swift development馃摫 Kotlin Application馃摫馃摫 iOS馃摫 Artificial Intelligence 馃捇 Data science
Kushal Shingote
An implementation to rank your favourite songs from World of Walker

World-Of-Walker-Elo An implementation to rank your favourite songs from Alan Walker's 2021 album World of Walker. Uses the Elo rating system, which is

1 Nov 26, 2021
Run CodeServer on Google Colab using Inlets in less than 60 secs using your own domain.

Inlets Colab Run CodeServer on Colab using Inlets in less than 60 secs using your own domain. Features Optimized for Inlets/InletsPro Use your own Cus

2 Dec 30, 2021
VCC-Generator is a python script that generate VCC for testing purposes only

VCC-Generator is a python script that generate VCC for testing purposes only

Spider Anongreyhat 10 Oct 23, 2022
A quick experiment to demonstrate Metamath formula parsing, where the grammar is embedded in a few additional 'syntax axioms'.

Warning: Hacked-up code ahead. (But it seems to work...) What it does This demonstrates an idea which I posted about several times on the Metamath mai

Marnix Klooster 1 Oct 21, 2021
The repository is about 100+ python programming exercise problem discussed, explained, and solved in different ways

Break The Ice With Python A journey of 100+ simple yet interesting problems which are explained, solved, discussed in different pythonic ways Introduc

Abdullah Al Masud Tushar 2.2k Jan 04, 2023
Python communism - A module for initiating the communist revolution in each of our python modules

Python communist revolution A man once said to abolish the classes or something

758 Jan 03, 2023
Calculatrix is a project where I'll create plenty of calculators in a lot of differents languages

Calculatrix What is Calculatrix ? Calculatrix is a project where I'll create plenty of calculators in a lot of differents languages. I know this sound

1 Jun 14, 2022
A wrapper for the apt package manager.

A wrapper for the apt package manager.

531 Jan 04, 2023
HiSim - House Infrastructure Simulator

HiSim is a Python package for simulation and analysis of household scenarios using modern components as alternative to fossil fuel based ones.

FZJ-IEK3 17 Dec 17, 2022
A tutorial presents several practical examples of how to build DAGs in Apache Airflow

Apache Airflow - Python Brasil 2021 Este tutorial apresenta v谩rios exemplos pr谩ticos de como construir DAGs no Apache Airflow. Background Apache Airfl

Jusbrasil 14 Jun 03, 2022
Wrapper around anjlab's Android In-app Billing Version 3 to be used in Kivy apps

IABwrapper Wrapper around anjlab's Android In-app Billing Version 3 to be used in Kivy apps Install pip install iabwrapper Important ( Add these into

Shashi Ranjan 8 May 23, 2022
Push Prometheus metrics to VictoriaMetrics or other exporters

Push metrics from your periodic long-running jobs to existing Prometheus/VictoriaMetrics monitoring system.

olegm 14 Nov 04, 2022
Demo Python project using Conda and Poetry

Conda Poetry This is a demonstration of how Conda and Poetry can be used in a Python project for dev dependency management and production deployment.

Ryan Allen 2 Apr 26, 2022
Choice Coin 633 Dec 23, 2022
solsim is the Solana complex systems simulator. It simulates behavior of dynamical systems鈥擠eFi protocols, DAO governance, cryptocurrencies, and more鈥攂uilt on the Solana blockchain

solsim is the Solana complex systems simulator. It simulates behavior of dynamical systems鈥擠eFi protocols, DAO governance, cryptocurrencies, and more鈥攂uilt on the Solana blockchain

William Wolf 12 Jul 13, 2022
TimeWizard - A script that generates every single Time Wizard EDOPRO lflist possible

EDOPRO F&L list generator This project is just a script that generates every sin

Diamond Dude 2 Sep 28, 2022
Bootcamp de Introducci贸n a la Programaci贸n. M贸dulo 6: Matem谩ticas Discretas

M贸dulo 6: Matem谩ticas Discretas 脷ltima actualizaci贸n: 12 de marzo Ir贸nicamente, las matem谩ticas discretas son las matem谩ticas que lo cuentan todo. Si

Cynthia Castillo 34 Sep 29, 2022
Delayed iteration for polling and retries.

Does Python need yet another retry / poll library? It needs at least one that isn't coupled to decorators and functions. Decorators prevent the caller

A. Coady 22 Dec 29, 2022
Supercharge your NFTs with new behaviours and superpowers!

WrapX Supercharge your NFTs with new behaviours and superpowers! WrapX is a collection of Wrappers (currently one - WrapXSet) to decorate your NTFs ad

Emiliano Bonassi 9 Jun 13, 2022
Python script for diving image data to train test and val

dataset-division-to-train-val-test-python python script for dividing image data to train test and val If you have an image dataset in the following st

Muhammad Zeeshan 1 Nov 14, 2022