Skip to main content

Posts

Showing posts with the label Learning

Yen Currency Trend

 I found the trend by this code. This trend is from Japanese Workers' Pay Day(Every 25th day in a month). '''python import yfinance as yf import matplotlib . pyplot as plt import pandas as pd import seaborn as sns # 分析期間の設定 dateStart = "2015-01-01" dateEnd = "2026-05-23" ticker = "JPY=X" # ドル円 # yfinanceから取得(仕様変更の警告回避のため auto_adjust を明示) df = yf . download ( ticker , start = dateStart , end = dateEnd , auto_adjust = False , progress = False ) # yfinanceの仕様変更(MultiIndex化)に対応して終値を安全に抽出 if isinstance ( df . columns , pd . MultiIndex ): close = df [ "Close" ][ ticker ].dropna() else : close = df [ "Close" ]. dropna () # 前日比の変化率(%)を計算 # ドル円の場合、プラス = ドル買い/円売り、マイナス = ドル売り/円買い daily_return = close . pct_change () * 100 # 分析用のDataFrameを作成 analysis_df = pd . DataFrame ({ "Return" : daily_return }) analysis_df . index = pd . to_datetime ( analysis_df . index ...

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

Difference between Type Stack (S) and Type Queue (Q) In this post, I explore the relationship between two learning types—Stack (S) and Queue (Q)—and their outcomes. Here, “Stack” and “Queue” are programming-inspired metaphors: S-type persons learn in a stack-like way, relying on memory, while Q-type persons learn in a queue-like way, relying on an internal image generator. In terms of abstraction, Learning Type (S or Q) is a higher-level concept, Integrated Learning Result is a mid-level concept, and Learning Result is a lower-level concept. For example, we might consider trust as an integrated learning result (a form of social capital), while money can be seen as a measurable outcome derived from that trust. In my code, the parameter b = 0.9 is introduced as an initial-condition bias, reflecting the influence of family inheritance and economic background. The horizontal axis is scaled so that x = 1.0 corresponds to 10 years of life, a scale derived from empirical observation...

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()

Contact Form

Name

Email *

Message *