Skip to content

deshen24/syntheticNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Synthetic Nearest Neighbors (SNN)

Synthetic Nearest Neighbors (SNN) is an algorithm for matrix completion.

This repository implements the SNN algorithm presented in Causal Matrix Completion; we remark that the synthetic interventions estimator of Synthetic Interventions is a special case of the SNN algorithm. Please refer to the paper for details on the SNN algorithm, as well as its operating assumptions and statistical guarantees.

Additionally, please contact the authors below if you find any bugs or have any suggestions for improvement (e.g., efficiently storing anchor rows and columns so as to avoid repeated computations). Thank you!

Author: Dennis Shen (deshen@mit.edu, dshen24@berkeley.edu)

Code dependencies

This code has the following dependencies:

  • Python 3.5+ with the libraries: (networkx, numpy, sklearn)

Usage

from snn import SyntheticNearestNeighbors

# X is the observed data matrix with missing entries denoted as NaN

# initialize model 
snn = SyntheticNearestNeighbors() 

# impute missing entries
X_snn = snn.fit_transform(X)

Example

We provide an example script in demo.py.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages