FIFA-Player-Recomendation

⚽ FIFA Player Recommendation System

Python Flask License

A modern, AI-powered FIFA player recommendation system built with Flask and scikit-learn. Features separate models for male and female players with advanced search, similarity-based recommendations, and interactive player comparisons.

FIFA Player Recommendation System

✨ Features

🚀 Quick Start

Get up and running in 5 minutes!

Prerequisites

Installation

# 1. Clone the repository
git clone https://github.com/inboxpraveen/FIFA-Player-Recomendation.git
cd FIFA-Player-Recomendation

# 2. Install dependencies
pip install -r requirements.txt

# 3. Train models (~30 seconds)
python training/train.py

# 4. Run the application
python run.py

# 5. Open your browser
# Navigate to: http://localhost:5000

That’s it! The system is now ready to use.

Training Options

# Train both models (default)
python training/train.py

# Train only male model
python training/train.py --male

# Train only female model
python training/train.py --female

📖 For detailed training options, see training/README.md

📁 Project Structure

FIFA-Player-Recomendation/
├── app/                          # Flask web application
│   ├── main.py                   # Flask app with API endpoints
│   ├── static/
│   │   ├── css/
│   │   │   └── style.css         # Modern glassmorphism styles
│   │   └── js/
│   │       └── app.js            # Frontend JavaScript logic
│   └── templates/
│       └── index.html            # Main HTML template
│
├── src/                          # Core recommendation system
│   ├── data_processing.py        # Data loading and preprocessing
│   ├── model.py                  # Recommendation model (PlayerRecommender)
│   └── utils.py                  # Helper utilities
│
├── training/                     # Model training
│   ├── train.py                  # Training script
│   └── README.md                 # Training guide
│
├── models/                       # Trained models (generated)
│   ├── male_model.pkl            # Male players model
│   └── female_model.pkl          # Female players model
│
├── new-data/                     # FC 25 player datasets
│   ├── male_players.csv          # ~16K male players
│   └── female_players.csv        # ~1.5K female players
│
├── run.py                        # Application launcher
├── requirements.txt              # Python dependencies
├── README.md                     # This file (you are here)
├── PROJECT_SUMMARY.md            # Detailed technical documentation
├── INSTALL.md                    # Installation guide
└── CONTRIBUTING.md               # Contribution guidelines

🎮 How to Use

1. Search Players

2. Get Recommendations

3. Compare Players

4. Switch Gender

🧠 How It Works

The recommendation system uses content-based filtering with the following approach:

  1. Feature Extraction: 34 player attributes (Pace, Shooting, Passing, Dribbling, Defending, Physical, and their sub-attributes)
  2. Normalization: Min-max normalization for fair comparison across attributes
  3. Similarity Calculation: Cosine similarity on normalized feature vectors
  4. Precomputation: Similarity matrix computed once during training for fast inference
  5. Filtering: Optional position-based and age-based filtering

Time Complexity: O(1) for recommendations after precomputation
Space Complexity: O(n²) for similarity matrix, where n is number of players

📊 Dataset Information

The project uses FC 25 (FIFA 25) player data:

Key Attributes

🛠️ Technology Stack

🎨 Design Philosophy

📈 Performance

🤝 Contributing

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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

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

👨‍💻 Author

Praveen Kumar

🙏 Acknowledgments

📚 Documentation


⭐ If you find this project helpful, please give it a star!