Skip to content

Instantly share code, notes, and snippets.

View jinto's full-sized avatar

박제권 (Jay Park) jinto

  • Seoul
View GitHub Profile
import numpy as np
# 활성화 함수와 그 도함수
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def sigmoid_derivative(x):
return x * (1 - x)
# 학습 데이터 (하나의 샘플)
@jinto
jinto / arrowed_spines.py
Created January 31, 2025 14:34
기초수학 with 파이썬
def arrowed_spines(fig, ax, remove_ticks=False):
"""
좌표축 화살표를 그리기 위한 함수
https://stackoverflow.com/questions/33737736/matplotlib-axis-arrow-tip
"""
xmin, xmax = ax.get_xlim()
ymin, ymax = ax.get_ylim()
# removing the default axis on all sides:
for side in ['bottom','right','top','left']: