]> AND Private Git Repository - predictops.git/blob - main.py
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
The module to generate the y variable is now created
[predictops.git] / main.py
1 from predictops.engine import Engine
2 from predictops.learn.preprocessing import Preprocessing
3
4 from logging import getLogger
5 from logging.config import fileConfig
6 from pathlib import Path
7
8 import geopandas as gpd
9
10 fileConfig((Path.cwd() / 'config') / 'logging.cfg')
11 logger = getLogger()
12
13 if __name__ == '__main__':
14
15     config = (Path.cwd() / 'config') / 'learn.cfg'
16     engine = Engine(config_file = config)
17
18     engine.add_features()
19     engine.add_target()
20
21     process = Preprocessing(config_file = config, dict_features = engine.X)
22
23     print(process.dataframe.head(n=20))
24     print(process.dataframe.tail(n=20))
25
26     #target = toarea(stream_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv')
27
28
29     exit()
30
31     depts = gpd.read_file( Path.cwd() / 'data' / 'targets' / 'departments' / "departements-20180101.shp")
32     Doubs = depts.loc[depts['nom'] == 'Doubs'].iloc[0]
33
34     ToArea(area=Doubs.geometry,
35            csv_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv')
36