{
  "fetched_at": "2026-10-19T07:50:55Z",
  "source_url": "https://www.kaggle.com/competitions/col-774-a-3-new/data",
  "pages": [
    {
      "name": "data-description",
      "content": "This section provides an overview of the `train.pkl` and `test.pkl` files included in this competition, outlining their formats and key definitions. This information will help participants understand what to expect from the datasets, what they need to predict, and any relevant terminology.\n\n### Files\n\n* **train.pkl**: This file contains the training dataset, which includes image data and corresponding labels. Participants will use this data to train their models and learn patterns within the dataset.\n\n* **test.pkl**: This file contains the test dataset, which includes image data along with an `id` for each image, but does not contain labels. Participants will use this dataset to evaluate their models and generate predictions for submission.\n\n### Data Format\n\nBoth `train.pkl` and `test.pkl` are structured as lists of tuples, where each tuple contains:\n\n1. **Image Data**: A tensor representation of an image, typically of shape `(C, H, W)`, where:\n   - `C` represents the number of channels (e.g., 3 for RGB images).\n   - `H` and `W` represent the height and width of the image.\n\n2. **Label** (only in `train.pkl`): An integer representing the class label associated with the image. This label indicates the category to which the image belongs.\n\n3. **ID** (only in `test.pkl`): A unique identifier for each image, allowing participants to match their predictions to the corresponding images.\n\n### Example Structure\n\nThe following illustrates the structure of each dataset:\n\n* **`train.pkl`**:\n   - Entry: `(image_tensor, label)`\n   - Example: `(<tensor of shape (3, 32, 32)>, 5)` where `5` is the label for the corresponding image.\n\n* **`test.pkl`**:\n   - Entry: `(id, image_tensor)`\n   - Example: `(12345, <tensor of shape (3, 32, 32)>)` where `12345` is the unique identifier for the image.\n\n### Dataset Analysis\n\n#### Train Dataset\n- **Number of samples**: 40,000\n- **Sample batch shape**: `torch.Size([64, 3, 32, 32])`\n- **Sample labels shape**: `torch.Size([64])`\n- **Min pixel value**: 0.0\n- **Max pixel value**: 1.0\n\n#### Test Dataset\n- **Number of samples**: 20,000\n- **Sample batch shape**: `torch.Size([64, 3, 32, 32])`\n- **Sample labels shape**: `torch.Size([64])`\n- **Min pixel value**: 0.0\n- **Max pixel value**: 1.0\n\n### Predictions\n\nParticipants are expected to predict the class labels for the images in the `test.pkl` dataset. The goal of the competition is to develop a model that accurately assigns labels to these unlabeled images based on the training data. The predictions should be submitted alongside the corresponding IDs to ensure correct association.\n\n### Sample Code\n\nHere is a code snippet to help participants load and analyze the datasets:\n\n```python\nimport pickle\nimport torch\nfrom torch.utils.data import Dataset, DataLoader\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nclass CIFAR100Dataset(Dataset):\n    def __init__(self, file_path):\n        with open(file_path, 'rb') as f:\n            self.data = pickle.load(f)\n\n    def __len__(self):\n        return len(self.data)\n\n    def __getitem__(self, idx):\n        image, label = self.data[idx]\n        return image, label\n\ndef analyze_dataset(dataset, dataset_name):\n    \"\"\"Function to analyze the dataset\"\"\"\n    print(f\"\\n--- Analysis of {dataset_name} Dataset ---\")\n    print(f\"Number of samples: {len(dataset)}\")\n    \n    # Get a sample batch\n    sample_batch, sample_labels = next(iter(DataLoader(dataset, batch_size=64)))\n    \n    print(f\"Sample batch shape: {sample_batch.shape}\")\n    print(f\"Sample labels shape: {sample_labels.shape}\")\n    \n    # Check the range of pixel values\n    print(f\"Min pixel value: {sample_batch.min()}\")\n    print(f\"Max pixel value: {sample_batch.max()}\")\n    \n    # Display a few sample images with their labels\n    visualize_samples(sample_batch, sample_labels, dataset_name)\n\ndef visualize_samples(images, labels, dataset_name):\n    \"\"\"Function to visualize sample images\"\"\"\n    num_images = min(8, len(images))  # Display a maximum of 8 images\n    plt.figure(figsize=(10, 5))\n    for i in range(num_images):\n        plt.subplot(2, 4, i + 1)\n        plt.imshow(images[i].permute(1, 2, 0))  # Change to HWC format for plotting\n        plt.title(f'ID: {labels[i].item()}' if dataset_name == \"Test\" else f'Label: {labels[i].item()}')\n        plt.axis('off')\n    plt.suptitle(f'Sample Images from {dataset_name} Dataset')\n    plt.tight_layout()\n    plt.show()\n\n# Load datasets\ntrain_dataset = CIFAR100Dataset('train.pkl')\ntest_dataset = CIFAR100Dataset('test.pkl')\n\n# Analyze datasets\nanalyze_dataset(train_dataset, \"Train\")\nanalyze_dataset(test_dataset, \"Test\")\n```\n\n\n",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "rules",
      "content": "- **Code of Conduct**: Any form of misconduct, including hard-coding results or using pre-trained models against the guidelines, will result in severe penalties, potentially including failing the course. Participants are expected to adhere to ethical standards and maintain integrity throughout the competition.\n\n- **Data Usage**: Only `train.pkl` should be used for model training. Using any other data for training or tuning your model is strictly prohibited.\n\n- **Team Formation**: Teams of up to 4 members are permitted. Each team must submit their code, trained model, and a detailed report explaining their approach and results. Collaboration and effective communication within the team are encouraged to enhance the learning experience.\n",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "abstract",
      "content": "In critical applications such as **medical diagnostics**, **autonomous driving**, and **financial systems**, the risks associated with incorrect predictions can be significant. For instance, a self-driving car that fails to detect an obstacle may cause a serious accident, while an incorrect medical diagnosis could lead to harmful treatments. Thus, models must make predictions only when they are highly confident. If they lack sufficient confidence, they should abstain from predicting.\n\n### Assignment Objective\n\nThis assignment focuses on developing machine learning models that achieve **high overall accuracy** while ensuring **high-confidence predictions**. You will train models using the **CIFAR-100 dataset**, consisting of **60,000 32x32 color images** across **100 classes**. Out of these, **40,000 images will be used for training**. Each image is associated with fine-grained class labels like \"apple,\" \"car,\" or \"tree.\"\n\nYou will be given an **\"accuracy threshold\"** as input. Your goal is to make predictions on the test set such that:\n1. The overall test accuracy for all classes exceeds the specified **accuracy threshold**.\n2. The number of examples classified into any class is maximized. \n\nIf your model cannot confidently predict a class label, it should indicate a **failure to predict** by assigning a label of **-1**.\n\n- The custom metric rewards confident predictions and penalizes uncertain ones.\n- Class-wise accuracy is calculated to distinguish between high and low accuracy classes.\n- The final score is based on the counts of high and low accuracy predictions.\n\n---\n\n### Evaluation Metric\n\nModel performance will be evaluated using a custom metric that rewards confident predictions and penalizes cases of uncertainty. Predictions with a class label of **-1** will not be considered for evaluation, focusing on reliability and accuracy.\n\n### Metric Components\n\n**Notations:**\n- **ŷᵢ**: Predicted label for the i-th example.\n- **yᵢ**: True label for the i-th example.\n- **𝒫ₜ**: Set of examples predicted as class c.\n- **α**: Accuracy threshold distinguishing high and low accuracy classes.\n- **γ**: Penalty applied to low-accuracy counts.\n\n**Class-wise Accuracy:**\n\nThe accuracy for each class **c** is calculated as:\n\n```\nAccuracy(c) = (Σ [ŷᵢ = yᵢ] for i ∈ 𝒫ₜ) / |𝒫ₜ|\n```\n\n**Classification Metrics:**\n\n- **High Accuracy Class Count:**\n\n```\nHigh Accuracy Count = Σ [1 if Accuracy(c) ≥ α] × |𝒫ₜ|\n```\n\n- **Low Accuracy Class Count:**\n\n```\nLow Accuracy Count = Σ [1 if Accuracy(c) < α] × |𝒫ₜ|\n```\n\n**Final Evaluation Score:**\n\nThe overall score is calculated as:\n\n```\nFinal Score = High Accuracy Count - γ × Low Accuracy Count\n```\n\nFor the **Kaggle leaderboard**, use **α = 0.99** and **γ = 5**. For private testing, **α** may range from **[0.98, 0.999]**. Aim to minimize the low accuracy count to make the performance independent of **γ**.\n\nYour submission file should include two columns:\n- `ID`: Unique identifier for each test example, matching IDs from the `test.pkl` file.\n- `Predicted_label`: Class label in the range of [-1, 99].\n\nThe file format should be:\n\n```\nID,Predicted_label\n1,42\n2,15\n3,-1\n...\n```\n\n**Important**: Do not shuffle the IDs in your submission file to ensure correct alignment for evaluation.\n\n### Tentative Submission Deadlines\n1. **Submission 1**: 6th October\n2. **Submission 2**: 20th October\n3. **Submission 3**: 27th October\n4. **Submission 4**: 10th November\n\nAll deadlines are inclusive, and submissions must be made by 7 PM on the respective date.\n\n### Rules\n\n1. Use any open-source tool or library but mention it in your report. Pre-trained weights are not allowed.\n2. Training must not exceed 5 hours on the provided HPC.\n3. Prediction must not exceed 30 minutes on the provided HPC.\n4. Model file (model.pth) must be under 1 GB.\n5. Ensure reproducibility by using fixed seed values in your code.\n6. Any misconduct, including hard-coding results or using disallowed models, will result in severe penalties.\n\nGood luck, and happy coding!\n",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    }
  ]
}