This file contains 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
fig, axes = plt.subplots(16, 4) | |
fig.set_figheight(60) | |
fig.set_figwidth(20) | |
fig.subplots_adjust(hspace=0.4, wspace=0.4) | |
for i in range(len(data.columns)): | |
row = i // 4 | |
column = i % 4 | |
sns.stripplot(x="label", y=data.columns[i], data=data, ax=axes[row, column]).set_title("{} VS label".format(data.columns[i])) |
This file contains 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
data = pd.DataFrame() | |
for col in _data.columns: | |
if col != "bookingID" and col != "label": | |
temp = _data.groupby("bookingID")[col].agg(["mean", "sum", "max", "min"]) | |
data[col + "_mean"] = temp["mean"] | |
data[col + "_sum"] = temp["sum"] | |
data[col + "_max"] = temp["max"] | |
data[col + "_min"] = temp["min"] |
This file contains 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 | |
def sigmoid(x): | |
return 1 / (1 + np.exp(-x)) | |
Wa = np.array([0.45, 0.25]).reshape(1, 2) | |
Wi = np.array([0.95, 0.8]).reshape(1, 2) | |
Wf = np.array([0.7, 0.45]).reshape(1, 2) | |
Wo = np.array([0.6, 0.4]).reshape(1, 2) |