ium_464914/get_stats.py

19 lines
640 B
Python
Raw Normal View History

2024-04-02 22:35:43 +02:00
import pandas as pd
2024-04-13 19:17:29 +02:00
forest_train = pd.read_csv('forest_train.csv')
forest_test = pd.read_csv('forest_test.csv')
forest_val = pd.read_csv('forest_val.csv')
2024-04-02 22:35:43 +02:00
with open('stats.txt', 'w') as f:
2024-04-13 19:17:29 +02:00
f.write(f"Wielkosc treningowego zbioru:\n {forest_train.shape}\n")
f.write(f"Wielkosc testowego zbioru:\n {forest_test.shape}\n")
f.write(f"Wielkosc walidacyjnego zbioru:\n {forest_val.shape}\n")
2024-04-02 22:35:43 +02:00
2024-04-02 22:40:34 +02:00
f.write(f"\Zbior Treningowy:\n")
2024-04-13 19:17:29 +02:00
f.write(f"{forest_train.describe()}\n")
2024-04-02 22:35:43 +02:00
2024-04-02 22:40:34 +02:00
f.write(f"\Zbior Testowy:\n")
2024-04-13 19:17:29 +02:00
f.write(f"{forest_test.describe()}\n")
2024-04-02 22:35:43 +02:00
2024-04-02 22:40:34 +02:00
f.write(f"\Zbior walidacyjny:\n")
2024-04-13 19:17:29 +02:00
f.write(f"{forest_val.describe()}\n")