-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: master
Are you sure you want to change the base?
Conversation
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
…s parameter and calculate accordingly
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 Report
@@ 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
Continue to review full report at Codecov.
|
5c5dda9
to
5ecaa2a
Compare
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
…dTime-Sensitivity
There was a problem hiding this 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.
neet/boolean/sensitivity.py
Outdated
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 |
There was a problem hiding this comment.
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.
neet/boolean/sensitivity.py
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous suggestion.
Got rid of randNet files and fixed plot issues
Description
Worked on added the extended time sensitivity parameter to the sensitivity and average_sensitivity functions in sensitivity.py
Type of change:
Tests:
Please describe the tests that you ran to verify your changes.
I ran a couple tests through terminal. Will be running more later.