Skip to content

Commit

Permalink
Merge pull request #361 from neurodata/staging
Browse files Browse the repository at this point in the history
v0.0.3: merge staging into main
  • Loading branch information
levinwil authored Nov 17, 2020
2 parents 9ee05b7 + ec29e47 commit 671ff6a
Show file tree
Hide file tree
Showing 59 changed files with 3,529 additions and 3,481 deletions.
24 changes: 24 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
codecov:
token: d73047ad-2322-4be0-962c-7de537deff4a
branch: main

coverage:
status:
project:
default:
# Commits pushed to main should not make the overall
# project coverage decrease by more than 1%:
target: auto
threshold: 1%
patch:
default:
# Be tolerant on slight code coverage diff on PRs to limit
# noisy red coverage status on github PRs.
# Note: The coverage stats are still uploaded
# to codecov so that PR reviewers can see uncovered lines
target: auto
threshold: 1%

ignore:
- "proglearn/sims"
- "proglearn/tests"
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# ProgLearn

[![Build Status](https://travis-ci.org/neurodata/ProgLearn.svg?branch=main)](https://travis-ci.org/neurodata/ProgLearn)
[![codecov](https://codecov.io/gh/neurodata/ProgLearn/branches/main/graph/badge.svg)](https://codecov.io/gh/neurodata/ProgLearn)
[![Codecov](https://codecov.io/gh/neurodata/ProgLearn/branches/main/graph/badge.svg)](https://codecov.io/gh/neurodata/ProgLearn)
[![PyPI version](https://img.shields.io/pypi/v/proglearn.svg)](https://pypi.org/project/proglearn/)
[![arXiv shield](https://img.shields.io/badge/arXiv-2004.12908-red.svg?style=flat)](https://arxiv.org/abs/2004.12908)
[![arXiv](https://img.shields.io/badge/arXiv-2004.12908-red.svg?style=flat)](https://arxiv.org/abs/2004.12908)
[![License](https://img.shields.io/badge/License-MIT-blue)](https://opensource.org/licenses/MIT)
[![Netlify Status](https://img.shields.io/netlify/97f86f49-81ed-4292-a100-f7031b54ecc7)](https://app.netlify.com/sites/neuro-data-proglearn/deploys)
[![Downloads](https://img.shields.io/pypi/dm/proglearn.svg)](https://pypi.org/project/proglearn/#files)


`ProgLearn` (**Prog**ressive **Learn**ing) is a package for exploring and using progressive learning algorithms developed by the [neurodata group](https://neurodata.io).

Expand Down
87 changes: 43 additions & 44 deletions benchmarks/parity_experiment/experiment.ipynb

Large diffs are not rendered by default.

52 changes: 8 additions & 44 deletions benchmarks/parity_experiment/generate_paper_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def get_colors(colors, inds):

ns = np.concatenate((n1s, n2s + n1s[-1]))
ls = ["-", "--"]
algorithms = ["XOR Forest", "N-XOR Forest", "Lifelong Forest", "Naive Forest"]
algorithms = ["XOR Forest", "N-XOR Forest", "Progressive Learning Forest (PLF)", "Random Forest (RF)"]


TASK1 = "XOR"
Expand All @@ -92,23 +92,6 @@ def get_colors(colors, inds):
colors = sns.color_palette("Set1", n_colors=2)

ax1 = fig.add_subplot(gs[7:13, 2:8])
# for i, algo in enumerate(algorithms):
ax1.plot(
n1s,
mean_error[0, : len(n1s)],
label=algorithms[0],
c=colors[1],
ls=ls[np.sum(0 > 1).astype(int)],
lw=3,
)
ax1.plot(
ns[len(n1s) :],
mean_error[2, len(n1s) :],
label=algorithms[1],
c=colors[1],
ls=ls[1],
lw=3,
)

ax1.plot(
ns,
Expand All @@ -134,7 +117,7 @@ def get_colors(colors, inds):
ax1.set_xlabel("Total Sample Size", fontsize=fontsize)
ax1.tick_params(labelsize=labelsize)
ax1.set_yticks([0.1, 0.3, 0.5])
ax1.set_xticks([250, 750, 1500])
ax1.set_xticks([50, 750, 1500])
# ax1.axvline(x=750, c='gray', linewidth=1.5, linestyle="dashed")
ax1.set_title("XOR", fontsize=30)

Expand All @@ -149,43 +132,25 @@ def get_colors(colors, inds):
#######################
mean_error = unpickle("plots/mean_xor_nxor.pickle")

algorithms = ["XOR Forest", "N-XOR Forest", "Lifelong Forest", "Naive Forest"]
algorithms = ["XOR Forest", "N-XOR Forest", "Progressive Learning Forest (PLF)", "Random Forest (RF)"]

TASK1 = "XOR"
TASK2 = "N-XOR"

ax1 = fig.add_subplot(gs[7:13, 10:16])
ax1.plot(
n1s,
mean_error[0, : len(n1s)],
label=algorithms[0],
c=colors[1],
ls=ls[np.sum(0 > 1).astype(int)],
lw=3,
)
ax1.plot(
ns[len(n1s) :],
mean_error[2, len(n1s) :],
label=algorithms[1],
c=colors[1],
ls=ls[1],
lw=3,
)

ax1.plot(
ns[len(n1s) :],
mean_error[3, len(n1s) :],
label=algorithms[2],
c=colors[0],
ls=ls[1],
lw=3,
)
ax1.plot(
ns[len(n1s) :],
mean_error[5, len(n1s) :],
label=algorithms[3],
c="g",
ls=ls[1],
lw=3,
)

Expand All @@ -196,7 +161,7 @@ def get_colors(colors, inds):
ax1.tick_params(labelsize=labelsize)
ax1.set_yticks([0.1, 0.5, 0.9])
# ax1.set_yticks([0.15, 0.2])
ax1.set_xticks([250, 750, 1500])
ax1.set_xticks([50, 750, 1500])
# ax1.axvline(x=750, c='gray', linewidth=1.5, linestyle="dashed")

# ax1.set_ylim(0.11, 0.21)
Expand All @@ -214,7 +179,7 @@ def get_colors(colors, inds):

##################
mean_te = unpickle("plots/mean_te_xor_nxor.pickle")
algorithms = ["Lifelong BTE", "Lifelong FTE", "Naive BTE", "Naive FTE"]
algorithms = ["PLF BTE", "PLF FTE", "RF BTE", "RF FTE"]

TASK1 = "XOR"
TASK2 = "N-XOR"
Expand Down Expand Up @@ -243,7 +208,7 @@ def get_colors(colors, inds):
ax1.set_xlabel("Total Sample Size", fontsize=fontsize)
ax1.tick_params(labelsize=labelsize)
ax1.set_yticks([0.05, 1, 2.5])
ax1.set_xticks([250, 750, 1500])
ax1.set_xticks([50, 750, 1500])
# ax1.axvline(x=750, c='gray', linewidth=1.5, linestyle="dashed")
right_side = ax1.spines["right"]
right_side.set_visible(False)
Expand All @@ -270,13 +235,12 @@ def get_colors(colors, inds):
mean_te[1, len(n1s) :],
label=algorithms[1],
c=colors[0],
ls=ls[1],
lw=3,
)

ax1.plot(ns, mean_te[2], label=algorithms[2], c="g", ls=ls[0], lw=3)
ax1.plot(
ns[len(n1s) :], mean_te[3, len(n1s) :], label=algorithms[3], c="g", ls=ls[1], lw=3
ns[len(n1s) :], mean_te[3, len(n1s) :], label=algorithms[3], c="g", lw=3
)

ax1.set_ylabel("Forward/Backward \n Transfer Efficiency (FTE/BTE)", fontsize=fontsize)
Expand All @@ -285,7 +249,7 @@ def get_colors(colors, inds):
ax1.set_xlabel("Total Sample Size", fontsize=fontsize)
ax1.tick_params(labelsize=labelsize)
ax1.set_yticks([0.2, 0.6, 1, 1.2])
ax1.set_xticks([250, 750, 1500])
ax1.set_xticks([50, 750, 1500])
# ax1.axvline(x=750, c='gray', linewidth=1.5, linestyle="dashed")
right_side = ax1.spines["right"]
right_side.set_visible(False)
Expand Down
Binary file modified benchmarks/parity_experiment/plots/parity_exp.pdf
Binary file not shown.
548 changes: 548 additions & 0 deletions benchmarks/spiral_experiment/experiment.ipynb

Large diffs are not rendered by default.

Binary file not shown.
187 changes: 187 additions & 0 deletions benchmarks/uf_posterior_visualization/uncertaintyforest_fig1.ipynb

Large diffs are not rendered by default.

174 changes: 0 additions & 174 deletions benchmarks/xor_rxor_spiral_exp/control_exp.py

This file was deleted.

Loading

0 comments on commit 671ff6a

Please sign in to comment.