messo codice che segna i punti invece delle rette

This commit is contained in:
2025-01-29 14:03:46 +01:00
parent 194596b8b2
commit 45a5b07bda
11 changed files with 219 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ int MAX_EPOCHE = 10000;
4: NOR
5: XNOR
*/
int tipo = 1;
int tipo = 0;
void stampa_risultati(Percettrone);
void sleep_ms(int);
@@ -77,6 +77,7 @@ void main()
int corrette = 0;
Retta *rette = (Retta *)malloc(sizeof(Retta));
Punto *punti = (Punto *)malloc(sizeof(Punto));
// Soglia sigmoide
double soglia_funzione_attivazione = 0.5;
@@ -88,6 +89,8 @@ void main()
printf("\nEpoche necessarie: %d\n", i);
stampa_risultati_layer_singolo(p);
//cls(tipo, 0);
for (int z = 0; z < i; z++)
{
cls(tipo, 0);
@@ -106,7 +109,6 @@ void main()
for (int j = 0; j < 4; j++)
{
double y = funzione_sigmoide(p, x[j][0], x[j][1]);
double errore = -(output[j] - y);