
# deit-base-patch16-224-finetuned-stroke-binary

This model is a fine-tuned version of [facebook/deit-base-patch16-224](https://huggingface.co/facebook/deit-base-patch16-224) on an BTX24/tekno21-brain-stroke-dataset-binary dataset.
It achieves the following results on the evaluation set:
- Loss: 0.1527
- Accuracy: 0.9489
- F1: 0.9484
- Precision: 0.9505
- Recall: 0.9489

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 48
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch   | Step | Validation Loss | Accuracy | F1     | Precision | Recall |
|:-------------:|:-------:|:----:|:---------------:|:--------:|:------:|:---------:|:------:|
| 0.1646        | 0.6202  | 100  | 0.1588          | 0.9430   | 0.9425 | 0.9442    | 0.9430 |
| 0.1417        | 1.2357  | 200  | 0.1640          | 0.9439   | 0.9433 | 0.9458    | 0.9439 |
| 0.1681        | 1.8558  | 300  | 0.1622          | 0.9453   | 0.9447 | 0.9470    | 0.9453 |
| 0.1512        | 2.4713  | 400  | 0.1510          | 0.9435   | 0.9430 | 0.9441    | 0.9435 |
| 0.1506        | 3.0868  | 500  | 0.1913          | 0.9340   | 0.9327 | 0.9391    | 0.9340 |
| 0.1654        | 3.7070  | 600  | 0.1679          | 0.9426   | 0.9419 | 0.9442    | 0.9426 |
| 0.1482        | 4.3225  | 700  | 0.1551          | 0.9403   | 0.9402 | 0.9402    | 0.9403 |
| 0.1599        | 4.9426  | 800  | 0.1489          | 0.9462   | 0.9457 | 0.9471    | 0.9462 |
| 0.1477        | 5.5581  | 900  | 0.1437          | 0.9426   | 0.9424 | 0.9425    | 0.9426 |
| 0.1308        | 6.1736  | 1000 | 0.1527          | 0.9417   | 0.9414 | 0.9416    | 0.9417 |
| 0.1362        | 6.7938  | 1100 | 0.1608          | 0.9426   | 0.9421 | 0.9432    | 0.9426 |
| 0.1494        | 7.4093  | 1200 | 0.1601          | 0.9435   | 0.9429 | 0.9451    | 0.9435 |
| 0.1592        | 8.0248  | 1300 | 0.1430          | 0.9430   | 0.9429 | 0.9429    | 0.9430 |
| 0.16          | 8.6450  | 1400 | 0.1504          | 0.9457   | 0.9451 | 0.9475    | 0.9457 |
| 0.1245        | 9.2605  | 1500 | 0.1506          | 0.9462   | 0.9458 | 0.9470    | 0.9462 |
| 0.1397        | 9.8806  | 1600 | 0.1971          | 0.9313   | 0.9300 | 0.9359    | 0.9313 |
| 0.1396        | 10.4961 | 1700 | 0.1527          | 0.9489   | 0.9484 | 0.9505    | 0.9489 |


### Framework versions

- Transformers 4.48.3
- Pytorch 2.6.0+cu124
- Datasets 3.4.0
- Tokenizers 0.21.0



![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/IFuGQ-kkCjVH--4eyht0R.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/CztgY9KMJ5AhHY2TGo7qk.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/REn-aZtdJ8bAm4_lWSJDV.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/rZhYIlfmQg62Pq-1vt71j.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/75hOug5_xZeyk69eAW8as.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/NAomNblJJoYM1ki1caw1h.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/rOY6uq2Tb2W4pwYygtws3.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/MiiBgBt1SVoGA1DGjCzBR.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/6aYsp0Q01uKGu7nFRF0jK.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/1IlTpcATEDWXVO3ZVU8yc.png)
![image/png](https://cdn-uploads.huggingface.co/production/uploads/662eb39820de310d1558dd55/i4g8AM9nePnUTPRPmSBAd.png)
inme var inme yok