prep_st2_iso1=preprocess() prep_st2_iso1.fit(inp_var=iso_18,var_name="iso_18",fields=["CooX","CooY","CooZ"],remove_outliers=False,direc=ddir_inp_classess) prep_st2_iso2=preprocess() prep_st2_iso2.fit(inp_var=iso_2h,var_name="iso_2h",fields=["CooX","CooY","CooZ"],remove_outliers=False,direc=ddir_inp_classess) #prep_st2_iso3=preprocess() #prep_st2_iso3.fit(inp_var=iso_2h,var_name="is3",fields=["CooX","CooY","CooZ"],remove_outliers=False,direc=ddir_inp_classess) #------------------------------------------- #stage 1 model est_class=model() est_class.st1_fit(var_cls_list=[preped_prc,preped_tmp,preped_hmd], st1_model_month_list=[1,2,3], direc=dir_outs_st1) #------------------------------------------- #stage 1 model plots plots.best_estimator_plots(est_class,st2=False) plots.partial_dep_plots(est_class,st2=False) #------------------------------------------- #stage 1 prediction est_class.st1_predict(cls_list=[prep_st2_iso1,prep_st2_iso2],st2_model_month_list=[1,2,3]) #------------------------------------------- #save stage 1 model object est_class_dir=session.save(est_class,name='est_class_st1') #-------------------------------------------
index_col=False, keep_default_na=True) ev_class_map = evaluation() ev_class_map.predict(est_class, pred_inputs=pred_inputs_map, direc=join(dir_outs, "preds_map_all_points")) #to compare 2 isotopes: plots.isotopes_meteoline_plot(ev_class_map, est_class, var_list=['iso_18', 'iso_2h']) #------------------------------------------- #test session.save(ev_class_map) ev_class_map = session.load( r"C:\Users\Ash kan\Documents\meteo_iso_model_input_code_and_results\case_studies\salar_de_atacama\manual_filtered_data_v4\outputs\preds_map_all_points\isocompy_saved_object_21_Jan_2022_17_27_st1False_st2False.pkl" ) #------------------------------------------- # To generate the maps shp_file = join(dir_inp, "cuenca_shp", "Cuenca.shp") opt_title_list = [ "Precipitation (mm)", "Relative Humidity (%)", "Temperature ($^\circ$C)", f'\N{GREEK SMALL LETTER DELTA}\N{SUPERSCRIPT ONE}\N{SUPERSCRIPT EIGHT}O' + '(\u2030 VSMOW)' ]