Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bc4588e
Not much here. Mostly comments
Oct 27, 2019
ab96e09
First attempt at implementation
Myles-Damon Oct 28, 2019
d975436
New testing notebook & fixed mistakes which stopped the code from runnin
Oct 28, 2019
63ca11b
The C-Sensitivity isn't right for c=1. IDK what is wrong
Myles-Damon Oct 29, 2019
2a47369
Merge branch 'master' into Derrida-Plot-Branch
tamart21 Oct 30, 2019
736cf6a
Fixed C-Sensitivity by using distance instead of indicator function
Nov 5, 2019
6463211
Merge branch 'master' into Myles-Branch-C-Sensitivity
Nov 6, 2019
2e3ce46
Merge pull request #1 from akiaei/Myles-Branch-C-Sensitivity
akiaei Nov 6, 2019
3bad83d
Merge branch 'master' into Derrida-Plot-Branch
tamart21 Nov 6, 2019
854e31c
Just added some of the in-code documentation to C-sens functions
Nov 12, 2019
ba040a9
Merge remote-tracking branch 'origin/master' into ExtendedTime-Sensit…
Nov 12, 2019
2a4fd1b
tamart21 Nov 19, 2019
be0ccca
Fixed a latent overflow issue w/ np.pow and cleaned up derrida-plot()
Nov 22, 2019
20f7d7c
Updated sensitivity and average_sensitivity to account for a timestep…
Nov 23, 2019
11f5ecc
Merge branch 'Derrida-Plot-Branch' into ExtendedTime-Sensitivity
Nov 23, 2019
9cd3d5c
Added Extended-Time plot method
wtopping Nov 23, 2019
e2d2528
wtopping Nov 23, 2019
360d6d7
Merge branch 'ExtendedTime-Sensitivity' into Extended-Time-Plot
wtopping Nov 23, 2019
be418f8
Jan 30, 2020
de11df3
Addressed issues brought up in the PR response
Myles-Damon Jan 30, 2020
f55e4e0
Update neet/boolean/sensitivity.py
Myles-Damon Jan 30, 2020
a6d303a
mostly cosmetic changes tbh
Myles-Damon Feb 11, 2020
5ecaa2a
Feb 18, 2020
ef63099
Merge branch 'Myles-Branch-C-Sensitivity' into ExtendedTime-Sensitivity
Feb 21, 2020
9fdb2f7
Feb 23, 2020
57b7533
Feb 23, 2020
31cb3db
Merge remote-tracking branch 'Original-Elife-ASU/master' into Extende…
Feb 23, 2020
12f70eb
Mar 19, 2020
4287161
:shirt: Satisfy autopep8
dglmoore Mar 20, 2020
54fdf51
:hammer::heavy_check_mark: Bring sensitivity tests to 100%
dglmoore Mar 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
434 changes: 434 additions & 0 deletions examples/Untitled.ipynb

Large diffs are not rendered by default.

402 changes: 76 additions & 326 deletions examples/basic-examples.ipynb

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions neet/boolean/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from neet.python import long
from .sensitivity import SensitivityMixin
import copy
from itertools import combinations


class BooleanNetwork(SensitivityMixin, UniformNetwork):
Expand Down Expand Up @@ -159,7 +160,7 @@ def subspace(self, indices, state=None):
else:
i += 1

def hamming_neighbors(self, state):
def hamming_neighbors(self, state, c=1):
"""
Get all states that one unit of Hamming distance from a given state.

Expand All @@ -179,11 +180,12 @@ def hamming_neighbors(self, state):
"""
if state not in self:
raise ValueError('state is not in state space')
neighbors = [None] * self.size
for i in range(self.size):
neighbors[i] = copy.copy(state)
neighbors[i][i] ^= 1
return neighbors

for bits in combinations(range(self.size), c):
neighbor = copy.copy(state)
for i in bits:
neighbor[i] ^= 1
yield neighbor

def distance(self, a, b):
"""
Expand Down
Loading