I started studying data analysis in Python for the Python Data Analysis Exam. Today, I studied the basics of functions, statistics, and probability by reading a textbook. I also plotted some graphs using Python.
Exponential function:
SIgmoid function
Vector (example in 2D)
Logarithmic function
Trigonometric function (based on a right triangle or unit circle)
import numpy as np
def exponential(x):
return np.exp(x)
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def log(x):
return np.log(x), np.log2(x), np.log10(x)
def sin(x):
return np.sin(x)
def cos(x)
return np.cos(x)
def tan(x):
return np.tan(x)
memo:
Here are the main inverse trigonometric functions in NumPy:
np.arcsin(x) — inverse sine (arcsin)
np.arccos(x) — inverse cosine (arccos)
np.arctan(x) — inverse tangent (arctan)
np.degrees(x) — converts radians to degrees
np.radians(x) — converts degrees to radians
import numpy as np
x = 0.5
angle_rad = np.arcsin(x)
angle_deg = np.degrees(angle_rad)
print(f"arcsin({x}) = {angle_rad:.2f} radians or {angle_deg:.2f} degrees")
Hello, my name is Koki. I am currently learning the web framework Django and English. In my free time, I enjoy hiking, cycling, and visiting shrines and temples. At work, I make software for programmable logic controllers (PLCs), I work especially with OMRON and Mitsubishi PLCs. Please feel free to contact me for any inquiries, job requests, or just to chat. We look forward to hearing from you via email!