-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from BlancaCC/backpropagation
Proyecto en su estadio final
- Loading branch information
Showing
116 changed files
with
7,751 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 0 additions & 59 deletions
59
Biblioteca-Redes-Neuronales/src/one_layer_neuronal_network.jl
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
Biblioteca-Redes-Neuronales/test/one_layer_neural_network.test.jl
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
Experimentos/inicializacion-pesos-red-neuronal/0_experimento_sintetico.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
######################################################## | ||
# EXPERIMENTO SINTÉTICO DE NUESTRO algoritmo | ||
# Visualiza para ciertos tamaños de muestra el error obtenido | ||
######################################################## | ||
using Random | ||
using Plots | ||
using TOML | ||
FICHERO_CONFIGURACION = "Experimentos/.config.toml" | ||
config = TOML.parsefile(FICHERO_CONFIGURACION)["visualizacion-inicializacion-pesos-R"] | ||
img_path = config["DIRECTORIO_IMAGENES"] | ||
|
||
Random.seed!(1) | ||
include("../../OptimizedNeuralNetwork.jl/src/OptimizedNeuralNetwork.jl") | ||
using .OptimizedNeuralNetwork | ||
|
||
M = 1 | ||
K_range = 3 | ||
f_regression(x)=(x<1) ? exp(-x)-4 : log(x) | ||
for (data_set_size,n) in zip([3,4,5, 8,15,23,51,73,100, 103],[2,3,5,7,10,20,51,72,90, 100]) | ||
|
||
println("EXPERIMENTO SINTÉTICO") | ||
println("n=$n y tamaño conjunto $data_set_size") | ||
# Partición del conjunto de muestra | ||
X_train= Vector(LinRange(-K_range, K_range, n)) | ||
Y_train = map(f_regression, X_train) | ||
# Cálculo de la red neuronal con pesos inicializados | ||
h = nn_from_data(X_train, Y_train, n, M) | ||
# Función de evaluación por forward propagation | ||
evaluate(x)=forward_propagation(h, | ||
RampFunction,x) | ||
# Visualización | ||
interval = [-K_range,K_range] | ||
file_name = "f_ideal_y_rn_con_$(n)_neuronas" | ||
plot(x->evaluate([x])[1], | ||
-K_range,K_range, | ||
label="red neuronal n=$n" | ||
) | ||
plot!(f_regression, | ||
label="f ideal", | ||
title="Comparativa función ideal y red neuronal n=$n" | ||
) | ||
png(img_path*file_name) | ||
end |
Oops, something went wrong.