quality_models.__class__.__name__, mixed_models.__class__.__name__, subjective_column_name, ], ) # store prediction result PublicSupport.save_dataframe( all_df, os.path.join(output_result_path, "prediction" + datetime.now().strftime("%Y-%m-%d %H.%M.%S")) ) if len(sys.argv) < 2: raise ValueError("Usage:", sys.argv[0], " Missing some argument to indicate input files") json_dict = PublicSupport.read_json(sys.argv[1]) # input folder struct data_home = os.path.abspath(json_dict["data_home"]) PublicSupport.create_path(data_home) original_data_home = os.path.join(data_home, json_dict["original_data_home"]) PublicSupport.create_path(original_data_home) predict_data_home = os.path.join(data_home, json_dict["predict_data_home"]) PublicSupport.create_path(predict_data_home) feature_data_home = os.path.join(data_home, json_dict["feature_data_home"]) PublicSupport.create_path(feature_data_home) model_data_home = os.path.join(data_home, json_dict["model_data_home"]) PublicSupport.create_path(model_data_home) output_result_home = os.path.join(data_home, json_dict["output_result_home"]) PublicSupport.create_path(output_result_home) preprocessed_folder = json_dict["preprocessed_folder"]
def deserialize_json(path, serialized_id): json_dict = PublicSupport.read_json(os.path.join(path, serialized_id + ".json")) return json_dict[RegressionManager.x_dim_name], json_dict[RegressionManager.y_dim_name]