This project aims to predict foreign currency exchange rates using machine learning techniques. The data was obtained from the Free Currency API (https://freecurrencyapi.com/) and processed to clean outliers, missing and null values. A Random Forest Regression model was trained on the preprocessed data, and hyperparameter tuning was performed to optimize the model's performance. The model's predictions were evaluated using accuracy metrics, and privacy was ensured using the Privacy-Aware Training Environments (PATE) framework for security.
Data is extracted from freecurrencyapi.com to obtain historical currency exchange rates.
- Duplicate values are removed to ensure data integrity.
- Missing and null values are handled through imputation or removal based on the data characteristics.
- Outliers are detected and treated using the Interquartile Range (IQR) method.
A Random Forest Regression model is chosen for its ability to handle nonlinear relationships and robustness against overfitting.
The Random Forest Regression model is trained on the preprocessed data to learn the underlying patterns and relationships.
Hyperparameters of the Random Forest Regression model are optimized using techniques like Grid Search or Random Search to enhance performance.
The trained model is used to predict future currency exchange rates based on historical data.
Model predictions are evaluated using accuracy metrics such as mean squared error (MSE), R-squared (R2) score, and mean absolute error (MAE) to assess predictive performance.
Privacy-Aware Training Environments (PATE) framework is implemented to ensure the security and privacy of sensitive data used in the project.
-
Data Collection: Run the data extraction script to obtain currency exchange rate data from freecurrencyapi.com.
-
Preprocessing: Clean the data, handle missing values, and remove outliers using the preprocessing script.
-
Model Training: Train the Random Forest Regression model on the preprocessed data.
-
Hyperparameter Tuning: Optimize the model's hyperparameters to improve performance.
-
Currency Prediction: Use the trained model to predict future currency exchange rates.
-
Evaluation: Evaluate the model's performance using accuracy metrics.
-
Security Implementation: Implement the PATE framework to ensure data security and privacy.