Predict **TAIEX.ML.s11_Scatter Plot.散布圖(2) # Sample data sampled_data = data.sample(n=1000, random_state=42) # Plot pairwise relationships sns.pairplot(sampled_data) plt.suptitle('Scatter Plot of Variables', y=1.02) plt.show()
Predict **TAIEX.ML.s11_Scatter Plot.散布圖(1) '**有些變數的視覺化趨勢就蠻明顯的(見下圖) import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from scipy.stats import pearsonr # Mount Google Drive from google.colab import drive drive.mount('/content/drive', force_remount=True) # Load the data file_path = '/content/drive/
Predict TAIEX.ML.s02_Dataset.數據描述 from google.colab import drive drive.mount('/content/drive') import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from scipy import stats # Load the data file_path = '/content/drive/My Drive/MSCI_Taiwan_30_data_with_OBV.csv' data = pd.read_csv(
Predict TAIEX.ML.s01_Varians.變數說明 變數名稱 說明 Close_TAIEX TAIEX 指數的收盤價 Adj_Close 收盤價 Aroon Down Aroon 指標中的下降線 Aroon Up Aroon 指標中的上升線 Band Width 布林帶的寬度 Beta_120 過去 120 天的 Beta 值 Beta_60 過去 60 天的 Beta 值 CCI20 20 天商品通道指數 Close 收盤價 CMO14 14 天的錢德動量震盪指標 %D 隨機指標中的 %D 線 Date 日期 High 最高價
Predict **Scatter Matrix by Varians and ST_Stock ( P<0.05) Mounted at /content/drive Overall Pearson Correlation with Close_TAIEX: Pearson Correlation P-value RSI21 0.185104 2.388407e-245 RSI14 0.151384 6.581929e-165 CMO14 0.098249 4.022700e-70 Aroon Up 0.095180 3.432801e-65 RSI7 0.094756 9.565736e-66 CCI20 0.087107 3.717489e-55 Signal Line 0.083004 1.343307e-49
practice Scatter Matrix by ST_Stock. Pearson Correlation with Close_TAIEX for 2330.TW (TSMC) Pearson Correlation P-value Close_TAIEX_TAIEX 1.000000 0.000000e+00 Adj_Close 0.954742 0.000000e+00 Low 0.951000 0.000000e+00 MA7 0.950148 0.000000e+00 Middle Band 0.949835 0.000000e+00 MA21 0.949652 0.
practice Close_TAIEX -N.Scatter Plot Matrix_0630 import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from scipy.stats import pearsonr # Mount Google Drive from google.colab import drive drive.mount('/content/drive', force_remount=True) # Load the data file_path = '/content/drive/My Drive/MSCI_
practice Heat MAP.MSCI 個股對 TAIEX 的 Pearson analysis.(f)0630 MSCI 個股對 TAIEX 的 Pearson analysis import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from scipy.stats import pearsonr # Mount Google Drive from google.colab import drive drive.mount('/content/drive', force_remount=True) # Load the data file_path
MSCI.TW30.Pearson correlation coefficient,Draft,發散的亂算 import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from scipy.stats import pearsonr # Mount Google Drive from google.colab import drive drive.mount('/content/drive', force_remount=True) # Load the data file_path = '/content/drive/My Drive/MSCI_
Essay 盛夏月亮 Date: 2024-06-30 夏夜星稀月更明 笑靨如花 水清波影 清雅如蘭悄然秀 芳華馥郁 時光且相迎 情意滿懷溢心間 芳華初綻放 怎能不心傾 盛夏時光如畫 我的眼角是滿滿的驕傲 且行且珍惜 情意滿懷溢心間 芳華初綻放 怎能不心傾 盛夏時光如畫景 帶著滿滿的驕傲 這裡總會有最溫暖的守候 盛夏時光歲月靜好 小月光輝 長照心間 如含苞的花朵 綻放無與倫比的美麗 我的小月光 我的小月亮
practice SVM.dft1.TAIEX.POC.0628 from google.colab import drive drive.mount('/content/drive') !pip install yfinance scikit-learn matplotlib statsmodels ta import yfinance as yf import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler from sklearn.svm import SVR from sklearn.decomposition import PCA
practice Random_forest(dft.4)_TAIEX_0628 加入 beta,beta_120 beta_120的離散大 from google.colab import drive drive.mount('/content/drive') !pip install yfinance scikit-learn matplotlib statsmodels import yfinance as yf import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler from sklearn.ensemble import RandomForestRegressor
practice Random_Forest(dft.3)_TAIEX_POC_0628 * n_iter=10:這意味著隨機搜索將嘗試 10 種不同的參數組合。您可以根據時間和資源的限制來調整這個數字。 * cv=3:使用 3 折交叉驗證來評估每個參數組合,這可以在保持模型性能評估的同時減少計算時間。 from google.colab import drive drive.mount('/content/drive') !pip install yfinance scikit-learn matplotlib statsmodels import yfinance as yf import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing
practice 如何獲取 TAIEX 成分股代碼 !pip install pandas requests gspread oauth2client import pandas as pd import requests import gspread from google.colab import auth from oauth2client.client import GoogleCredentials from google.colab import drive # 掛載 Google Drive drive.mount('/content/drive') # 獲取 TAIEX 成分股代碼 url = "https://isin.twse.com.tw/isin/C_
practice Random_Forest(dft.2)_TAIEX_POC_0628 Fitting 2 folds for each of 20 candidates, totalling 40 fits Training MSE: 5453.5616 Testing MSE: 11776567.8450 Training MAE: 53.8584 Testing MAE: 3206.9294 OLS Regression 移除 BB_Upper,BB_Lower OLS Regression Results ============================================================================== Dep. Variable: ^TWII R-squared: 0.803 Model: OLS
practice Random_Forest(dft.1)_TAIEX_POC_0628 OLS Regression import yfinance as yf import pandas as pd import numpy as np import statsmodels.api as sm # 定義股票代碼和大盤指數 tickers = ["2330.TW", "2454.TW", "2317.TW", "2412.TW", "1303.TW", "2882.TW", "3008.TW", "
practice Random_Forest_(dft.0).TAIEX.POC.0628 from google.colab import drive drive.mount('/content/drive') !pip install yfinance scikit-learn matplotlib import yfinance as yf import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler from sklearn.ensemble import RandomForestRegressor import matplotlib.dates as mdates # 定義股票代碼和大盤指數 tickers
practice ARIMA.TAIEX.POC.0628 Simple ARIMA Model import pandas as pd import numpy as np import matplotlib.pyplot as plt import yfinance as yf from sklearn.preprocessing import MinMaxScaler from statsmodels.tsa.arima.model import ARIMA import datetime from google.colab import drive # 授權 Google Drive drive.mount('/content/drive') # 下載資料的函數 def
practice Linear Regress.TAIEX_POC.0628 1'st: 2024-06-28 最簡單的模型 import pandas as pd import numpy as np import matplotlib.pyplot as plt import yfinance as yf from sklearn.linear_model import LinearRegression from sklearn.preprocessing import MinMaxScaler from google.colab import drive import datetime # 授權 Google Drive drive.mount('/content/drive') # 定義下載資料的函數
practice Random_Forest_TAIEX_POC_0628 dataset: MSCI top 30 from google.colab import drive drive.mount('/content/drive') !pip install yfinance scikit-learn matplotlib import yfinance as yf import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler from sklearn.ensemble import RandomForestRegressor import matplotlib.dates
practice LSTM.TAIEX.POC.0628. dataset: MSCI top 30 company from google.colab import drive drive.mount('/content/drive') !pip install yfinance scikit-learn matplotlib tensorflow import yfinance as yf import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler from tensorflow.keras.models import Sequential
practice LSTM_TAIEX_0628 training 能力不好,要再調 特徵變數(Features) 特徵變數是用來預測目標變數的獨立變數。在這個例子中,特徵變數包括以下幾個部分: 1. Open: 當日的開盤價。 2. High: 當日的最高價。 3. Low: 當日的最低價。 4. Close: 當日的收盤價。 5. Adj Close: 經過調整的收盤價,考慮了股息和拆股等因素。 6. Volume: 當日的交易量。 7. Daily Change: 當日收盤價的日變動率,計算公式為 (當日收盤價 - 前一日收盤價) / 前一日收盤價。 8. Beta_60: 過去60天的Beta值,用於衡量股票相對於大盤的波動性。 9. Beta_120: 過去120天的Beta值,用於衡量股票相對於大盤的波動性。 目標變數(Target) 目標變數是我們想要預測的變數。
Economic Exploring the Kuznets Curve of Alzheimer's Disease (Draft.0624) update: 2024-06-24 ABSTRACT This study explores the relationship between economic development and Alzheimer's disease prevalence, conceptualized as the 'Kuznets Curve of Alzheimer's Disease'. Using data from 1990 to 2018 across 183 countries, we analyze the correlation between GDP per capita and Alzheimer's