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

Private GIT Repository
Starting to investigate the fact that qualitative features with NaN
[predictops.git] / main.py
1 from predictops.engine import Engine
2 from predictops.learn.preprocessing import Preprocessing
3 from predictops.target.all import All
4 from predictops.target.toarea import ToArea
5
6 from logging import getLogger
7 from logging.config import fileConfig
8 from pathlib import Path
9
10 import geopandas as gpd
11
12 fileConfig((Path.cwd() / 'config') / 'logging.cfg')
13 logger = getLogger()
14
15 if __name__ == '__main__':
16
17     config = (Path.cwd() / 'config') / 'learn.cfg'
18     engine = Engine(config_file = config)
19
20     engine.add_features()
21     #print(engine.X)
22     process = Preprocessing(config_file = config, dict_features = engine.X)
23
24
25     #print(engine.X[datetime.strptime('06/30/2010 21:00:00', '%m/%d/%Y %H:%M:%S')])
26     print(process.dataframe.head(n=20))
27     print(process.dataframe.tail(n=20))
28
29
30     target = All(stream_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv')
31
32
33     exit()
34
35     depts = gpd.read_file( Path.cwd() / 'data' / 'targets' / 'departments' / "departements-20180101.shp")
36     Doubs = depts.loc[depts['nom'] == 'Doubs'].iloc[0]
37
38     ToArea(area=Doubs.geometry,
39            start = start, end = end,
40            csv_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv')
41