Skip to content

raynellrajeev/KardomAi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KardomAi - Cardamom Price Prediction

A machine learning project that predicts cardamom prices using time series analysis with SARIMA (Seasonal AutoRegressive Integrated Moving Average) model. The project combines web-scraped market data with advanced time series analysis to provide accurate price forecasts.

Features

  • Time Series Analysis: Advanced SARIMA modeling for price prediction
  • Web Scraping: Automated data collection from Indian Spices Board
  • Data Visualization: Interactive plots of actual vs predicted prices
  • Price Forecasting: Future price predictions with confidence intervals

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/kardomai.git
cd kardomai
  1. Install required packages:
pip install pandas numpy matplotlib statsmodels selenium scikit-learn

Usage

Price Prediction

from tsa import KardomAi

# Initialize and train model
predictor = KardomAi("cardamom data.xlsx")
predictor.split_data(test_size=0.2)
predictor.train()

# Make predictions
results = predictor.evaluate()
future_prices = predictor.predict_future(
    start_date="2024-03-01",
    end_date="2024-03-31"
)

# Visualize results
from tsa import plot_actual_vs_predicted
plot_actual_vs_predicted(predictor, results, future_prices)

Web Scraping

from webscraping import scrape_prices

# Scrape latest prices from Indian Spices Board
scrape_prices()  # Saves data to 'scraped_data.csv'

Project Structure

  • tsa.py - Core time series analysis module with SARIMA implementation
  • webscraping.py - Web scraping module for Indian Spices Board data
  • README.md - Project documentation
  • cardamom data.xlsx - Historical price data

Data Requirements

The input Excel file should contain:

  • Date of Auction - Date in YYYY-MM-DD format
  • MaxPrice (Rs./Kg) - Daily maximum price in Indian Rupees per Kilogram

Model Details

The SARIMA model implementation includes:

  • Automatic parameter optimization
  • Stationarity testing
  • Seasonal decomposition
  • Cross-validation
  • Performance metrics (RMSE, MAE)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Raynell Rajeev

Acknowledgments

  • Indian Spices Board for providing market data
  • Open source community for tools and libraries

About

An app which helps cardamom farmers by analysing and forecasting cardamom sales, providing weather data and Ai chat.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages