Skip to content

Conversation

HeerakKashyap
Copy link

🚀 Add Comprehensive Few-Shot Learning Support (Issue #237)

📋 Overview

This PR implements comprehensive few-shot learning capabilities for igel, addressing GitHub issue #237 "Add Support for Few-Shot Learning". The implementation includes meta-learning algorithms, domain adaptation utilities, and transfer learning capabilities.

✨ Features Added

🧠 Meta-Learning Algorithms

  • Model-Agnostic Meta-Learning (MAML): Complete implementation with inner/outer loop optimization
  • Prototypical Networks: Embedding-based few-shot learning approach
  • Configurable parameters: Learning rates, task sampling, adaptation steps

�� Domain Adaptation

  • Fine-tuning adaptation: Adapt entire models to target domains
  • MAML-based adaptation: Use meta-learning for domain transfer
  • Support for source-to-target domain transfer

�� Transfer Learning

  • Feature extraction: Extract features from pre-trained models
  • Fine-tuning capabilities: Adapt pre-trained models to new tasks
  • Easy integration with existing models

🛠️ CLI Commands

  • igel few-shot-learn - Train few-shot learning models
  • igel domain-adapt - Perform domain adaptation
  • igel transfer-learn - Apply transfer learning

📁 Files Added/Modified

New Files

  • igel/igel/few_shot_learning.py - Core few-shot learning module
  • examples/few_shot_learning_example.yaml - Configuration example
  • examples/few_shot_learning_demo.py - Comprehensive demonstration script
  • tests/test_few_shot_learning.py - Complete test suite
  • docs/few_shot_learning.md - Detailed documentation

Modified Files

  • igel/igel/data.py - Added few-shot learning models to models_dict
  • `igel/

HeerakKashyap added 8 commits June 22, 2025 00:40
- Implement Model-Agnostic Meta-Learning (MAML) classifier
- Add Prototypical Networks for few-shot learning
- Create domain adaptation utilities with fine-tuning and MAML methods
- Add transfer learning capabilities with feature extraction and fine-tuning
- Include utility functions for creating and evaluating few-shot tasks
- Add CLI commands: few-shot-learn, domain-adapt, transfer-learn
- Update models_dict to include few-shot learning algorithms
- Add few_shot_learning as supported model type
- Create comprehensive documentation and examples
- Add complete test suite for all few-shot learning components
- Update README with new features and model table

This addresses GitHub issue nidhaloff#237 'Add Support for Few-Shot Learning'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant