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
データサイエンスチャレンジ2021 サンプル

データサイエンスチャレンジ2021 サンプル 概要 線形補間と Catmull–Rom Spline 補間のサンプル Python スクリプトです。 データサイエンスチャレンジ2021の出題意図としましては、訓練用データ(train.csv)から機械学習モデルを作成して、そのモデルに推論させてモーシ

Bandai Namco Research Inc. 5 Oct 17, 2022
Extended functionality for Namebase past their web UI

Namebase Extended Extended functionality for Namebase past their web UI.

RunDavidMC 12 Sep 02, 2022
CHIP-8 interpreter written in Python

chip8py CHIP-8 interpreter written in Python Contents About Installation Usage License About CHIP-8 is an interpreted language developed during the 19

Robert Olaru 1 Nov 09, 2021
Programa que organiza pastas automaticamente

📂 Folder Organizer 📂 Programa que organiza pastas automaticamente Requisitos • Como usar • Melhorias futuras • Capturas de Tela Requisitos Antes de

João Victor Vilela dos Santos 1 Nov 02, 2021
rebalance is a simple Python 3.9+ library for rebalancing investment portfolios

rebalance rebalance is a simple Python 3.9+ library for rebalancing investment portfolios. It supports cash flow rebalancing with contributions and wi

Darik Harter 5 Feb 26, 2022
The repository for my video "Playing MINECRAFT with a WEBCAM"

This is the official repo for my video "Playing MINECRAFT with a WEBCAM" on YouTube Original video can be found here: https://youtu.be/701TPxL0Skg Red

Rishabh 27 Jun 07, 2022
Simple calculator made in python

calculator Uma alculadora simples feita em python CMD, PowerShell, Bash ✔️ Início 💻 apt-get update apt-get upgrade -y apt-get install python git git

Spyware 8 Dec 28, 2021
SimplePyBLE - Python bindings for SimpleBLE

The ultimate fully-fledged cross-platform Python BLE library, designed for simplicity and ease of use.

Open Bluetooth Toolbox 27 Aug 28, 2022
36 key ergo split keyboard, designed around the Seeeduino Xiao platform

Slice36 Minimalist Split Keyboard 36 key ergo split keyboard, designed around the Seeeduino Xiao platform. Inspired by the Corne, Ferris, Ben Vallack'

54 Dec 21, 2022
nbsafety adds a layer of protection to computational notebooks by solving the stale dependency problem when executing cells out-of-order

nbsafety adds a layer of protection to computational notebooks by solving the stale dependency problem when executing cells out-of-order

150 Jan 07, 2023
App and Python library for parsing, writing, and validation of the STAND013 file format.

python-stand013 python-stand013 is a Python app and library for parsing, writing, and validation of the STAND013 file format. Features The following i

Oda 3 Nov 09, 2022
A Puzzle A Day Keep the Work Away

A Puzzle A Day Keep the Work Away No moyu again!

P4SSER8Y 5 Feb 12, 2022
Shared utility scripts for AI for Earth projects and team members

Overview Shared utilities developed by the Microsoft AI for Earth team The general convention in this repo is that users who want to consume these uti

Microsoft 38 Dec 30, 2022
Analyze FnO trends by using NSE Bhav copy

BhavFnO Analyze FnO trends by using NSE Bhav copy Download entire BhavFnO folder and unzip it In that folder open command window

33 Jan 04, 2023
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.

Boltons boltons should be builtins. Boltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously mis

Mahmoud Hashemi 6k Jan 06, 2023
Inviare messaggi tramite app IO a partire da dati contenuti in file .csv

parlaConIO Inviare messaggi tramite app IO a partire da dati contenuti in file .csv -- Nessun obbligo, ma in caso di clonazione o uso del programma c

Francesco Del Castillo 6 Aug 22, 2022
Sardana integration into the Jupyter ecosystem.

sardana-jupyter Sardana integration into the Jupyter ecosystem.

Marc Espín 1 Dec 23, 2021
TallerStereoVision Convencion Python Chile 2021

TallerStereoVision Convencion Python Chile 2021 Taller Stereo Vision & Python PyCon.cl 2021 Instalación Se recomienta utilizar Virtual Environment pyt

2 Oct 20, 2022
Launcher program to select which version of the Q-Sys software to launch.

QSC-QSYS Launcher Launcher program to select which version of the Q-Sys software to launch. Instructions To use the application simply save the "Q-Sys

Zach Lisko 2 Sep 28, 2022