Publication Date | Article | Notes |
---|---|---|
2016 | End-to-End Relation Extraction using LSTMs on Sequences and Tree Structures | Cited in multi-task sciERC (2018, below) |
2018-10-11 | BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding | |
Multi-Task Identification of Entities, Relations, and Coreference for Scientific Knowledge Graph Construction | Probably a lot of useful citations in here, not sure we need the coreference stuff. * SciERC datasets: http://nlp.cs.washington.edu/sciIE/ * Code: https://bitbucket.org/luanyi/scierc/src/master/ * Pretrained (best) models: NER, Coref, Relation |
|
2017-08-08 | [Structural |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DIRS := $(filter dir%, $(shell ls)) | |
foo_sources := $(wildcard */source/foo.a) | |
foo_targets_prt := $(patsubst %.a, %.b, $(foo_sources)) | |
foo_targets := $(subst source,target, $(foo_targets_prt)) | |
bar_sources := $(wildcard */source/bar.a) | |
bar_x := $(patsubst %/bar.a, %/Y.a, $(bar_sources)) | |
bar_y := $(patsubst %/bar.a, %/Z.a, $(bar_sources)) | |
bar_targets := $(bar_x) $(bar_y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' --- | |
#' title: "Regression for quantifying a regime change" | |
#' author: "David Marx" | |
#' date: "June 5, 2017" | |
#' output: html_document | |
#' --- | |
#' There are two time points of interest. We want to test the hypothesis that the regression | |
#' coefficients changed after these time points, respectively. We will accomplish this by introducing | |
#' dummy variables to denote whether we are before or after a particular change point. This approach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# chinese restuarant process | |
chinese_restaurant = function(n, uniform=FALSE){ | |
tables = c(1) # running counts of people at tables. Start by seating first person at their own table | |
U = runif(n) | |
for (i in 2:n){ | |
if(U[i]<1/i){ | |
tables = c(tables, 1) | |
} else { | |
p = tables/(i) # sum(tables) = i-1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
generate_distances = function(k){ | |
u_k = c(0,sort(runif(k-1)),1) | |
u_k[-1] - u_k[-(k+1)] | |
} | |
iters=1e4 | |
d = c(replicate(iters, generate_distances(2))) | |
plot(density(d), ylim=c(0,5)) | |
#abline(v=mean(d), lty=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Extract the backbone of a weighted network using the disparity filter | |
#' | |
#' Given a weighted graph, \code{backbone} identifies the 'backbone structure' | |
#' of the graph, using the disparity filter algorithm by Serrano et al. (2009). | |
#' @param graph The input graph. | |
#' @param weights A numeric vector of edge weights, which defaults to | |
#' \code{E(graph)$weight}. | |
#' @param directed The directedness of the graph, which defaults to the result | |
#' of \code{\link[igraph]{is_directed}}. | |
#' @param alpha The significance level under which to preserve the edges, which |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install.packages('venneuler') | |
library(venneuler) | |
venn_intersection_text = function(venn, classes, label, adjustment=0.5, xadj=0, yadj=0 ){ | |
# fits a line between the centers of two classes and draws label text at the midpoint of that line + adjustment | |
xv = adjustment*venn$centers[classes[1],1] + (1-adjustment)*venn$centers[classes[2],1] + xadj | |
yv = adjustment*venn$centers[classes[1],2] + (1-adjustment)*venn$centers[classes[2],2] + yadj | |
text(x=xv, y=yv, labels=label) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(igraph) | |
# Experiment parameters | |
n=10 # Primary class (i.e. subreddits) | |
m=100 # Secondary class (i.e. users) | |
threshold = .5 # edge threshold | |
###################################### | |
seed(123) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
import string | |
import re | |
import nltk | |
r = praw.Reddit('anger fuel comment monitor, by /u/shaggorama') | |
targets = ['hillary', 'trump', 'hilary', 'election'] | |
punc_pat = re.compile('['+string.punctuation+']') | |
blacklist = ['AutoModerator', '2016VoteBot'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Try to construct a dynamic graph object from an edgelist with sequential timestamps, to use render.d3movie per: | |
#' https://rpubs.com/kateto/netviz | |
#' | |
#install.packages('statnet') | |
#install.packages("ndtv") | |
library(igraph) | |
library(statnet) | |
library(ndtv) |