Learning Methods and Result Curves

 Learning Methods and Result Curves
I sometimes think about learning methods, Stuck(S) and Que(Q). S tends to learn as y = 1.3X Q tends to learn as y = X**1.3 This difference shows short term winning for S, but if Q survives, Q wins for long term.


    import numpy as np
    import matplotlib.pyplot as plt
    
    # データ生成
    x = np.linspace(0, 5, 100)
    y1 = 1.3 * x
    y2 = x ** 1.3
    
    # グラフ描画
    plt.figure(figsize=(8, 6))
    plt.plot(x, y1, label=r"$y = 1.3x$")
    plt.plot(x, y2, label=r"$y = x^{1.3}$")
    plt.xlabel("x")
    plt.ylabel("y")
    plt.title("Comparison")
    plt.legend()
    plt.grid(True)
    plt.show()

Popular posts from this blog

Difference between Type Stack (S) and Type Queue (Q)

Sin Waves and Cos Waves