| # wilshire_5000 | # wilshire_5000 | ||||
| Classical Installations Required : numpy, pandas, tensorflow and matplotlib (and warnings) | |||||
| Other Installation : statsmodels for ARIMA predictions (pip install statsmodels) | |||||
| ## Données | ## Données | ||||
| [Données](https://fred.stlouisfed.org/series/WILL5000INDFC) | [Données](https://fred.stlouisfed.org/series/WILL5000INDFC) |
| import pandas | |||||
| import numpy as np | |||||
| csv = pandas.read_csv("WILL5000INDFC.csv") | |||||
| extraction = csv["WILL5000INDFC"].tolist() | |||||
| for i in range(len(extraction)) : | |||||
| if extraction[i] == "." : | |||||
| extraction[i] = extraction[i-1] | |||||
| extraction = np.array(extraction).astype(float) | |||||
| print(extraction) | |||||
| np.save("dataset.npy", extraction) |
| import pandas as pd | import pandas as pd | ||||
| import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||||
| import wilshire | import wilshire | ||||
| import tensorflow_addons as tfa | |||||
| from statsmodels.tsa.arima.model import ARIMA | from statsmodels.tsa.arima.model import ARIMA | ||||
| ], | ], | ||||
| "source": [ | "source": [ | ||||
| "## Plot all a with already saved models (the name of the folders should not be changed)\n", | "## Plot all a with already saved models (the name of the folders should not be changed)\n", | ||||
| "## the name of the models' folders should be \"Snake{a_value}a\"\n", | |||||
| "nn.plot_all_a(a=[\"1\",\"10\",\"20\",\"30\",\"50\",\"100\"])" | "nn.plot_all_a(a=[\"1\",\"10\",\"20\",\"30\",\"50\",\"100\"])" | ||||
| ] | ] | ||||
| }, | }, |
| 100 epochs adam mse 2_runs 4_batch_size | |||||
| [[0.5401026606559753, 0.0], [0.5401026606559753, 0.0], [0.18415303528308868, 0.009042516350746155], | |||||
| [0.1577790528535843, 0.0004640519618988037], [0.007161237532272935, 0.0007062254007905722]] | |||||
| [[0.0681375540792942, 0.11859790716458475], [0.0113261666148901, 0.002322317928070604], [nan, nan], | |||||
| [0.008264125511050224, 0.0013573866481290681], [0.008175850845873356, 0.001503577316727166]] |