def main(inputPath): inputFileName = ntpath.basename(inputPath) dataFrame = getDataFrame(inputPath) model = createPredictionModel(dataFrame) outputFrame = runDataThroughModel(model, dataFrame) if not os.path.exists(OUTPUT_DIR): os.makedirs(OUTPUT_DIR) outputFrame.to_csv(os.path.join(OUTPUT_DIR, "prediction_" + inputFileName), index=False)
def main(inputPath): inputFileName = ntpath.basename(inputPath) dataFrame = getDataFrame(inputPath) model = createAnomalyDetectionModel(dataFrame) outputFrame = runDataThroughModel(model, dataFrame) if not os.path.exists(OUTPUT_DIR): os.makedirs(OUTPUT_DIR) outputFrame.to_csv( os.path.join(OUTPUT_DIR, "anomaly_" + inputFileName), index=False )
def main(inputPath): # data/nyc_taxi.csv inputFileName = ntpath.basename(inputPath) # nyc_taxi.csv dataFrame = getDataFrame(inputPath) # timestamp value # 0 2014-07-01 00:00:00 10844 # 1 2014-07-01 00:30:00 8127 # 2 2014-07-01 01:00:00 6210 model = createPredictionModel(dataFrame) outputFrame = runDataThroughModel(model, dataFrame) if not os.path.exists(OUTPUT_DIR): os.makedirs(OUTPUT_DIR) outputFrame.to_csv( os.path.join(OUTPUT_DIR, "prediction2_" + inputFileName), index=False )