This Python program encompasses a data processing and modeling pipeline designed to analyze tips related to certain transactions. The functionality includes data visualization, model training, and inference. Users need to ensure updated CSV files are provided for order and store data.
Usage Requirements Ensure the following libraries are installed:
- os
- datetime
- pandas
- numpy
- tensorflow
- sklearn
- seaborn
- joblib
- logging
- matplotlib
- Execution
Run the program using command-line arguments:
- -V or --visualize: Visualize correlation graphs.
- -A or --artifacts: Save merged data to CSV.
Example:
python main.py -V -A
The main() function orchestrates the entire pipeline. It accepts arguments for visualization and artifact saving. Ensure the paths for order and store data CSV files are provided within the function.
This module contains a function get_tip() that calculates suggested tips based on a provided model. The main() function allows users to interactively input transaction details and get suggested tip amounts.
This script calculates the percentage of good, bad, and zero tips based on predictions generated by the model. Modify predictions_file variable to point to the predictions CSV file.
- Ensure all required dependencies are installed.
- Provide updated CSV files for order and store data.
- Execute main.py with appropriate command-line arguments (-V for visualization, -A for artifacts saving).
- Use infrence.py to interactively get suggested tip amounts based on the provided model.
- Use evaluate.py to analyze and calculate percentages of different types of tips based on prediction results.
- Ensure CSV files are up-to-date and paths are correctly specified.
- Adjust parameters within main() function for tip distributions and definitions as needed.