This file contains hidden or 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
from matplotlib import pyplot | |
def rectified(x): | |
return max(0.0, x) | |
series_in = [x for x in range(-100, 101)] | |
series_out = [rectified(x) for x in series_in] | |
pyplot.plot(series_in, series_out) | |
pyplot.show() |
This file contains hidden or 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 numpy as np | |
import matplotlib.pyplot as plt | |
def sigmoid(x): | |
return 1 / (1 + np.exp(-x)) | |
def derivative(x, step): | |
return (sigmoid(x+step) - sigmoid(x)) / step | |
x = np.linspace(-10, 10, 1000) |
This file contains hidden or 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
country | population | |
---|---|---|
China | 1415046 | |
India | 1354052 | |
United States | 326767 | |
Indonesia | 266795 | |
Brazil | 210868 | |
Pakistan | 200814 | |
Nigeria | 195875 | |
Bangladesh | 166368 | |
Russia | 143965 |
NewerOlder