X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/predictops.git/blobdiff_plain/66b4627c14e9f89a2e5ab73bbf48819f8f3a1455..964c1b87a6996c828c150a2b06a827350a4c2b10:/main.py diff --git a/main.py b/main.py index 426d3b5..27f502a 100644 --- a/main.py +++ b/main.py @@ -1,12 +1,9 @@ from predictops.engine import Engine -from predictops.learn.preprocessing import Preprocessing -from predictops.target.toarea import ToArea from logging import getLogger from logging.config import fileConfig from pathlib import Path -import geopandas as gpd fileConfig((Path.cwd() / 'config') / 'logging.cfg') logger = getLogger() @@ -17,19 +14,17 @@ if __name__ == '__main__': engine = Engine(config_file = config) engine.add_features() - #print(engine.X) - process = Preprocessing(config_file = config, dict_features = engine.X) + engine.add_target() + engine.add_preprocessing() - #print(engine.X[datetime.strptime('06/30/2010 21:00:00', '%m/%d/%Y %H:%M:%S')]) - print(process.dataframe.head(n=20)) - print(process.dataframe.tail(n=20)) - exit() + engine.learn() + + '''target = toarea(stream_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv') depts = gpd.read_file( Path.cwd() / 'data' / 'targets' / 'departments' / "departements-20180101.shp") Doubs = depts.loc[depts['nom'] == 'Doubs'].iloc[0] ToArea(area=Doubs.geometry, - start = start, end = end, csv_file = Path.cwd() / 'data' / 'targets' / 'sdis25' / 'interventions.csv') - + '''