Просмотр исходного кода

New results et surtout travail sur les graphes

Doriand
Doriand Petit 4 лет назад
Родитель
Сommit
59e1ab96a0
4 измененных файлов: 6656 добавлений и 6 удалений
  1. 6639
    0
      code/wilshire_5000/new_data.txt
  2. 9
    6
      code/wilshire_5000/nn.py
  3. Двоичные данные
      code/wilshire_5000/resnet18snake.png
  4. 8
    0
      code/wilshire_5000/results.txt

+ 6639
- 0
code/wilshire_5000/new_data.txt
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


+ 9
- 6
code/wilshire_5000/nn.py Просмотреть файл

def swish(x): def swish(x):
return(x*tf.math.sigmoid(x)) return(x*tf.math.sigmoid(x))


#activations = [tf.keras.activations.relu,swish,sinus_cosinus,sinus,snake]
activations = [snake]
activations = [tf.keras.activations.relu,swish,sinus_cosinus,sinus,snake]
#activations = [snake]
models = [] models = []
errors_train,errors_test = [],[] errors_train,errors_test = [],[]
mean_y_train,mean_y_test,std_y_test=[],[],[] mean_y_train,mean_y_test,std_y_test=[],[],[]
y_test_5=[] y_test_5=[]
errors_train_5=[] errors_train_5=[]
errors_test_5=[] errors_test_5=[]
for k in range(1):
for k in range(2):


model = tf.keras.Sequential() model = tf.keras.Sequential()


# y_preds_test.append(y_pred_test) # y_preds_test.append(y_pred_test)




x = np.arange(df_train.shape[0]+df_test.shape[0]+908)
x = np.arange(9000)
x = x / maximum x = x / maximum
future_preds = model.predict(x) ## Calculated with a website the number of working days between 01-06-2020 and 01-01-2024 future_preds = model.predict(x) ## Calculated with a website the number of working days between 01-06-2020 and 01-01-2024
plt.figure() plt.figure()
plt.plot(x,y_true,label="True data") plt.plot(x,y_true,label="True data")
plt.plot(x,y_pred,label="Predictions") plt.plot(x,y_pred,label="Predictions")
plt.vlines([5240,5326])
plt.vlines([6545,6629])
plt.legend() plt.legend()
plt.show() plt.show()


plt.figure() plt.figure()
plt.plot(x_cut,y_true,label="True data") plt.plot(x_cut,y_true,label="True data")
plt.plot(x,future_preds,label="Predictions") plt.plot(x,future_preds,label="Predictions")
plt.vlines([5240,5326],ymin=0,ymax=1)
plt.xticks(range(0, 9000, 250), range(1995, 2030, 1))
plt.xlabel("Années")
plt.ylabel("Index Willshire5000 normalisé")
plt.vlines([6545,6629],ymin=0,ymax=1)
plt.legend() plt.legend()
plt.show() plt.show()

Двоичные данные
code/wilshire_5000/resnet18snake.png Просмотреть файл


+ 8
- 0
code/wilshire_5000/results.txt Просмотреть файл

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]]

Загрузка…
Отмена
Сохранить