Skip to content

Extended time sensitivity #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

akiaei
Copy link

@akiaei akiaei commented Nov 23, 2019

Description

Worked on added the extended time sensitivity parameter to the sensitivity and average_sensitivity functions in sensitivity.py

Type of change:

  • [ X] New feature (non-breaking change which adds functionality)

Tests:

Please describe the tests that you ran to verify your changes.
I ran a couple tests through terminal. Will be running more later.

Myles and others added 23 commits October 27, 2019 14:22
Needs a test suite to figure out where I inevitably implemented it incorrectly
Merging Myles' C-Sens completed (but not unit-tested) code
cool
np.pow() has been deprecated in favor of the built-in pow operator (so ints no longer overflow, which is inevitable since we will be dividing by 2^network_size very frequently and network_size overflows after it gets to > 31). Also, I imported the pyplot function that Tyler was trying to use LOL
added timestep
added some unit testing and matplotlib dependency that was causing a build error before
Co-Authored-By: Douglas G. Moore <doug@dglmoore.com>
fixed unit test on time sensitivity tests
@codecov-io
Copy link

codecov-io commented Feb 18, 2020

Codecov Report

Merging #192 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #192      +/-   ##
==========================================
- Coverage   99.14%   99.07%   -0.07%     
==========================================
  Files          16       16              
  Lines        1397     1508     +111     
==========================================
+ Hits         1385     1494     +109     
- Misses         12       14       +2
Impacted Files Coverage Δ
neet/landscape.py 98.16% <ø> (ø) ⬆️
neet/boolean/network.py 100% <100%> (ø) ⬆️
neet/boolean/sensitivity.py 100% <100%> (ø) ⬆️
neet/python.py 66.66% <0%> (-33.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec9135b...54fdf51. Read the comment docs.

@akiaei akiaei force-pushed the ExtendedTime-Sensitivity branch from 5c5dda9 to 5ecaa2a Compare February 18, 2020 20:01
Ariana Kiaei added 4 commits February 20, 2020 20:30
merge, added unit test for c-sensitivty avg and normal, and solved an issue with hamming neighbors that was affecting extended time
Fixed issue with time sensitivity and added average time sensitivity unit tests
Added in a c-sensitivity test I forgot to add in earlier and fixed another one I had a typo on
Copy link
Contributor

@dglmoore dglmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The randnet_examples.py and randnet_randnet.py files ought not be here since they are unrelated to the sensitivity. Go ahead and delete them.

return s
#yield s / upper_bound # yields the normalized average c-sensitivity

def derrida_plot(self, max_c=None):#, transitions=None): #X-Axis = c value, Y-Axis = output of Average_c_sensitivity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, it seems this plot isn't actually plotting the data! You'll need to call plt.plot with x and y coordinates, and it might be good to add some default labels on the axes.

I'm thinking something like...

f, x = plt.subplots() # this will create a figure `f` and an axes object `ax`
ax.set_title('Derrida Plot') # set the title for this particular plot
ax.plot(range(max_c), yvals) # plot y-values vs. x-values
ax.set_xlabel('perturbation size (c)') # set the x-axis label
ax.set_ylabel('sensitivity') # the y-axis label
return f, ax # return the figure and the axes object.

By returning the figure and axes, end users can further modify the plots before they save them.

y_vals.append(self.Average_c_sensitivity(states=None, calc_trans=True, c=x))

print(y_vals)
def Extended_Time_Plot(self, max_timesteps=4, transitions=None): #X-Axis = c value, Y-Axis = output of Extended_Time
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous suggestion.

Ariana Kiaei and others added 3 commits March 19, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants