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
Chicks get hostloc points regularly

hostloc_getPoints 小鸡定时获取hostloc积分 github action大规模失效,mjj平均一人10鸡,以下可以部署到自己的小鸡上

59 Dec 28, 2022
A Regex based linter tool that works for any language and works exclusively with custom linting rules.

renag Documentation Available Here Short for Regex (re) Nag (like "one who complains"). Now also PEGs (Parsing Expression Grammars) compatible with py

Ryan Peach 12 Oct 20, 2022
Given tool find related trending keywords of input keyword

blog_generator Given tool find related trending keywords of input keyword (blog_related_to_keyword). Then cretes a mini blog. Currently its customised

Shivanshu Srivastava 2 Nov 30, 2021
A demo Piccolo app - a movie database!

PyMDb Welcome to the Python Movie Database! Built using Piccolo, Piccolo Admin, and FastAPI. Created for a presentation given at PyData Global 2021. R

11 Oct 16, 2022
An Agora Python Flask token generation server

A Flask Starter Application with Login and Registration About A token generation Server using the factory pattern and Blueprints. A forked stripped do

Nii Ayi 1 Jan 21, 2022
List of Linux Tools I put on almost every linux / Debian host

Linux-Tools List of Linux Tools I put on almost every Linux / Debian host Installed: geany -- GUI editor/ notepad++ like chkservice -- TUI Linux ser

Stew Alexander 20 Jan 02, 2023
Generate Openbox Menus from a easy to write configuration file.

openbox-menu-generator Generate Openbox Menus from a easy to write configuration file. Example Configuration: ('#' indicate comments but not implement

3 Jul 14, 2022
ToDo - A simple bot to keep track of things you need to do

ToDo A simple bot to keep track of things you need to do. Installation You will

3 Sep 18, 2022
Store Simulation

Almacenes Para clonar el Repositorio: Vaya a la terminal de Linux o Mac, o a la cmd en Windows y ejecute:

Johan Posada 1 Nov 12, 2021
Open source style Deep Dream project

DeepDream ⚠️ If you don't have a gpu with cuda, the style transfer execution time will be much longer Prerequisites Python =3.8.10 How to Install sud

Patrick martins de lima 7 May 17, 2022
Kunai Shitty Raider Leaked LMFAO

Kunai-Raider-Leaked Kunai Shitty Raider Leaked LMFA

5 Nov 24, 2021
Application launcher and environment management

Application launcher and environment management for 21st century games and digital post-production, built with bleeding-rez and Qt.py News Date Releas

10 Nov 03, 2022
Freeze your objects in python

gelidum Freeze your objects in python. Latin English Caelum est hieme frigidum et gelidum; myrtos oleas quaeque alia assiduo tepore laetantur, asperna

Diego J. 51 Dec 22, 2022
Cup Noodle Vending Maching Ordering Queue

Noodle-API Cup Noodle Vending Machine Ordering Queue Install dependencies in virtual environment python3 -m venv

Jonas Kazlauskas 1 Dec 09, 2021
The CS Netlogo Helper is a small python script I made, to make computer science homework easier.

The CS Netlogo Helper is a small python script I made, to make computer science homework easier. This project is really ironic now that I think about it.

1 Jan 13, 2022
Tool to audit and fix Python project requirements.

Requirement Auditor Utility to revise and updated python requirement files.

Luis Carlos Berrocal 1 Nov 07, 2021
Generic NDJSON importer for hashlookup server

Generic NDJSON importer for hashlookup server Usage usage: hashlookup-json-importer.py [-h] [-v] [-s SOURCE] [-p PARENT] [--parent-meta PARENT_META [P

hashlookup 2 Jan 19, 2022
Project issue to website data transformation toolkit

braintransform Project issue to website data transformation toolkit. Introduction The purpose of these scripts is to be able to dynamically generate t

Brainhack 1 Nov 19, 2021
Just some information about this nerd.

Greetings, mates, I am ErrorDIM - aka ErrorDimension 👋 🧬 Programming Languages I Can Use: 🥇 Top Starred Repositories: # Name Stars Size Major Langu

ErrorDIM 3 Jan 11, 2022
This is a repository containing the backend and the frontend of a simple pokédex.

Pokémon This is a repository containing the backend and the frontend of a simple pokédex. This is a work in progress project! Project Structure 🗂 pok

André Rato 1 Nov 28, 2021