HackIndia Logo
HackathonsNewsSkillsGrowth
HackIndia LogoContact: +91 9910125804

General

  • Companies
  • Colleges
  • Board of Advisors
  • Brand Ambassadors
  • FAQ
  • Contact
  • Report a Bug

Hackathons

  • Upcoming Hackathons
  • Judges
  • Mentors
  • Partners
  • Participating Colleges
  • Testimonials

Resources

  • About Us
  • Branding
  • Latest News
  • Growth
  • Skills
  • Builders
  • Ecosystem
  • Forum
  • Ideas
  • Prompt Optimizer
  • Games

© 2026 HackIndia. All rights reserved.

Privacy PolicyTerms of ServiceCode of ConductSitemap

Build 2.139 · 05 Nov 2026, 10:27 UTC

    HackIndia
    HackathonsNewsInternshipsSkillsGrowthPro Perks
    ← Report model results honestly

    All the reading

    Model Evaluation

    7 lessons, about 31 minutes. The check's questions come from these.

    Contents
    Checking accuracy against baseline
    1. 1. Why accuracy can mislead
    2. 5. Beat a real baseline
    Reading confusion matrix cells
    1. 2. Read a confusion matrix
    Choosing precision or recall
    1. 3. Choose precision or recall
    Splitting data and reporting results
    1. 4. Make a clean validation split
    2. 6. Write an honest result
    3. 7. Submit your evaluated project

    Checking accuracy against baseline

    1. Why accuracy can mislead

    4 min

    In 30 seconds
    • Spot when high accuracy hides bad model behaviour.
    • Compare accuracy with class balance before trusting results.
    • Write one honest line about why accuracy is not enough.

    The trap

    Accuracy feels simple. If your model gets 95% accuracy, it sounds internship-ready.

    But accuracy only says the share of correct predictions. It does not say which mistakes the model made. In many hackathon datasets, one class is much more common than the other.

    Key point

    Remember this

    High accuracy can be useless when the dataset is imbalanced. Always compare your accuracy with a dumb baseline that predicts the most common class.

    Example

    A common case

    Say you build a model to detect loan default risk. Your test set has 1,000 people. Only 50 actually default.

    A model that predicts “no default” for everyone gets 950 correct answers. That is 95% accuracy. But it finds zero risky cases.

    Total test rows: 1000
    Actual defaults: 50
    Actual non-defaults: 950
    
    Model prediction: always "non-default"
    Correct predictions: 950
    Accuracy: 950 / 1000 = 95%
    
    Useful for finding defaults: No
    Common mistake

    What beginners report

    A beginner writes: “Our model achieved 95% accuracy.” That line hides the real failure.

    A better line is: “The test set is imbalanced. A majority-class baseline gets 95% accuracy, so accuracy alone does not prove the model detects defaults.”

    5. Beat a real baseline

    4 min

    In 30 seconds
    • Pick a simple baseline your ML model must beat.
    • Compare your model and baseline on the same validation split.
    • Report the baseline even when the gap is small.
    Key point

    One idea

    A model result means little until you compare it with a real baseline. Your model should beat something simple, fixed, and fair on the same validation set.

    What counts as baseline

    A baseline is the simplest sensible prediction method for your task. It is not a weak model you choose just to look good.

    For classification, common baselines are majority class, random guess with class balance, or a simple rule. For tabular data, a basic logistic regression or decision tree can also be a fair baseline.

    Common mistake

    Bad baseline choices

    Do not compare your model to a number from a blog, a different dataset, or your training score. That is not fair.

    Also avoid a fake baseline like 50 percent accuracy when your dataset has 80 percent of one class. A majority-class predictor would already get 80 percent accuracy there.

    Reading confusion matrix cells

    2. Read a confusion matrix

    5 min

    In 30 seconds
    • Read true positives, false positives, false negatives, and true negatives from a confusion matrix.
    • Explain which mistakes your model makes, not just its accuracy.
    • Add a confusion matrix to your hackathon model evaluation section.
    Key point

    The one idea

    A confusion matrix shows where your model is right and where it is wrong. It is the fastest way to see the type of mistakes your model makes.

    For a binary classifier, read it as actual class versus predicted class. The off-diagonal cells are the mistakes.

    The four cells

    Imagine a model that predicts whether a UPI transaction is fraud. Positive means fraud. Negative means not fraud.

    True positive: fraud correctly predicted as fraud. True negative: normal transaction correctly predicted as normal. False positive: normal transaction wrongly flagged as fraud. False negative: fraud missed as normal.

    Example

    Small example

    Choosing precision or recall

    3. Choose precision or recall

    4 min

    In 30 seconds
    • Choose precision when false positives are costly.
    • Choose recall when false negatives are costly.
    • Report the metric that matches your product risk.
    Key point

    One choice

    Precision and recall are not just maths terms. They are product choices.

    Use precision when you want your positive predictions to be mostly correct. Use recall when you want to catch as many real positives as possible.

    What they mean

    Precision asks: out of the items your model marked positive, how many were truly positive?

    Recall asks: out of all truly positive items, how many did your model catch?

    Example

    Small example

    Say your model flags college event posts that need moderator review.

    It flagged 20 posts. 12 really needed review. There were 30 review-worthy posts in total.

    precision = 12 / 20 = 0.60
    recall = 12 / 30 = 0.40

    Splitting data and reporting results

    4. Make a clean validation split

    4 min

    In 30 seconds
    • Create train and validation sets without leaking answers.
    • Use stratified splits so class ratios stay similar.
    • Save the split method so your result can be checked later.
    Key point

    One clean rule

    Your validation set must act like future data. Do not let the same example, same user, or same source item appear in both training and validation.

    If your split is messy, your score may look good in the demo and fail when someone tries new data.

    What validation means

    Training data teaches the model. Validation data checks the model while you are building it.

    For a hackathon project, a common split is 80 percent train and 20 percent validation. The exact ratio is less important than making the split before tuning the model.

    Your to-do

    Make the split

    10 questions, 7 to pass.

    Sign in to take the test
    Your to-do

    Check class balance

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Example

    Quick Python check

    Use this before you celebrate an accuracy score. It works for any label column in a CSV.

    Change label to your target column name, like result, disease, churn, spam, or placed.

    import pandas as pd
    
    df = pd.read_csv("data.csv")
    label_col = "label"
    
    counts = df[label_col].value_counts()
    total = len(df)
    baseline_accuracy = counts.max() / total
    
    print("Class counts:")
    print(counts)
    print("Majority-class baseline accuracy:", round(baseline_accuracy, 4))
    Tip

    Use AI carefully

    You can ask ChatGPT, Gemini, or Claude: “Given these class counts and model accuracy, explain if accuracy is misleading.”

    Check that the answer compares your model to the majority-class baseline. If it only praises the accuracy number, it is not useful for evaluation.

    Your to-do

    Do this now

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Your to-do

    Pick one fairly

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Example

    Majority baseline code

    This example uses scikit-learn. It predicts the most common class from the training labels, then evaluates on validation labels.

    Use this for a first baseline in a binary or multi-class classification project.

    from sklearn.dummy import DummyClassifier
    from sklearn.metrics import confusion_matrix, classification_report
    
    # X_train, X_val, y_train, y_val should already come from your clean split
    
    baseline = DummyClassifier(strategy="most_frequent")
    baseline.fit(X_train, y_train)
    
    base_pred = baseline.predict(X_val)
    
    print("Baseline confusion matrix")
    print(confusion_matrix(y_val, base_pred))
    
    print("Baseline metrics")
    print(classification_report(y_val, base_pred, zero_division=0))
    Tip

    Use AI carefully

    You can ask ChatGPT, Gemini, or Claude: “Suggest a fair baseline for this ML task and explain why.” Paste your target column, class counts, and metric.

    Check the answer. The baseline must use only training data to decide its rule, must predict on validation data, and must be reported with the same metric as your model.

    Example

    How to write it

    Your hackathon project does not need a long research paper. Add a short baseline line in the evaluation section.

    Keep it direct, like this:

    Baseline: DummyClassifier with strategy='most_frequent'.
    It always predicts 'not_fraud', the majority class in the training set.
    Validation split: 80/20 stratified split, fixed random_state=42.
    Metric: recall for 'fraud', because missing fraud is costly.
    Baseline recall: 0.00. Our model recall: 0.71.
    Limitation: The validation set is small, so this result may change on new UPI-like transaction data.
    Your to-do

    Do this now

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Here is a confusion matrix for 100 transactions. Rows are actual labels. Columns are predicted labels.

    The model catches 12 fraud cases, misses 8 fraud cases, wrongly blocks 5 normal transactions, and allows 75 normal transactions.

                     Predicted normal   Predicted fraud
    Actual normal          75                 5
    Actual fraud            8                12
    Common mistake

    Common reading mistake

    Do not read a confusion matrix without checking the label order. Different tools may print labels in different orders.

    If you swap rows or columns, you may say the model missed fraud when it actually blocked normal users. That is a serious reporting error.

    Your to-do

    Read it safely

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Example

    Make one in Python

    Use this with your saved validation labels and predictions. It prints the label order so you do not guess.

    For a college project, put the matrix screenshot or table in your README or demo slides.

    from sklearn.metrics import confusion_matrix, ConfusionMatrixDisplay
    import matplotlib.pyplot as plt
    
    # Example labels: 1 = fraud, 0 = normal
    y_true = [0, 0, 0, 0, 1, 1, 1, 1, 1, 0]
    y_pred = [0, 0, 1, 0, 1, 0, 1, 0, 1, 0]
    
    labels = [0, 1]
    cm = confusion_matrix(y_true, y_pred, labels=labels)
    print("Label order:", labels)
    print(cm)
    
    # Rows are actual. Columns are predicted.
    disp = ConfusionMatrixDisplay(confusion_matrix=cm, display_labels=["normal", "fraud"])
    disp.plot(values_format="d")
    plt.title("Confusion matrix on validation set")
    plt.savefig("confusion_matrix.png", bbox_inches="tight")
    Tip

    Use AI carefully

    You can ask ChatGPT or Gemini to explain your confusion matrix in simple words. Paste the matrix, label order, and what positive means.

    Check the answer yourself. Make sure it does not invent precision, recall, business impact, or dataset details you did not provide.

    Prompt:
    Explain this confusion matrix for my hackathon README.
    Task: UPI fraud detection.
    Positive class: fraud.
    Rows are actual labels. Columns are predicted labels.
    Labels: [normal, fraud]
    Matrix:
    [[75, 5],
     [8, 12]]
    Keep it honest and mention the main mistake.
    Your to-do

    Do this now

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Your to-do

    Pick by harm

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Example

    Indian project cases

    For a UPI fraud alert model, recall is often more important. Missing a real fraud case is worse than checking one extra transaction.

    For an auto-shortlisting model for internship applications, precision may matter if you show only 20 candidates to a recruiter. Bad recommendations waste limited review time.

    Common mistake

    Common mistake

    Do not pick the metric after seeing which number looks better. That is result shopping.

    Pick precision or recall before you tune the model. Then report the other one too, so people can see the tradeoff.

    Tip

    Use a sentence

    Add one plain sentence to your demo. It shows you understand the risk, not just the formula.

    You can use this template in your README or presentation.

    We optimise for recall because missing a real [positive case] is worse than wrongly flagging a safe case. We still report precision to show the false alarm rate.
    Your to-do

    Do this now

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Example

    Simple sklearn split

    This works for a normal classification dataset where each row is independent. For example, predicting whether a support ticket is urgent or not urgent.

    Check the class counts after splitting. If your validation set has almost no positive cases, your precision or recall will not mean much.

    from sklearn.model_selection import train_test_split
    
    X = df.drop(columns=["label"])
    y = df["label"]
    
    X_train, X_val, y_train, y_val = train_test_split(
        X,
        y,
        test_size=0.2,
        random_state=42,
        stratify=y
    )
    
    print("Train size:", len(X_train))
    print("Validation size:", len(X_val))
    print("Train class ratio:")
    print(y_train.value_counts(normalize=True))
    print("Validation class ratio:")
    print(y_val.value_counts(normalize=True))
    Common mistake

    Common leakage

    Leakage means the validation set contains information the model would not have in real use. It makes results look better than they are.

    A common college project mistake is splitting image files after augmentation. If the original image is in train and a rotated copy is in validation, the model is being tested on something it has almost seen.

    Tip

    Split by group

    If many rows come from the same person, shop, hospital, device, or YouTube video, split by that group. This gives a more honest test.

    Example: for a student attendance model, do not put the same student in both train and validation. The model may learn that student, not attendance patterns.

    Example

    Group split example

    Use this when rows are not independent. The validation set will contain groups not seen during training.

    This is useful for projects with repeated users, sellers, patients, classrooms, or devices.

    from sklearn.model_selection import GroupShuffleSplit
    
    X = df.drop(columns=["label", "student_id"])
    y = df["label"]
    groups = df["student_id"]
    
    splitter = GroupShuffleSplit(
        n_splits=1,
        test_size=0.2,
        random_state=42
    )
    
    train_idx, val_idx = next(splitter.split(X, y, groups=groups))
    
    X_train = X.iloc[train_idx]
    X_val = X.iloc[val_idx]
    y_train = y.iloc[train_idx]
    y_val = y.iloc[val_idx]
    
    print("Train students:", groups.iloc[train_idx].nunique())
    print("Validation students:", groups.iloc[val_idx].nunique())
    Your to-do

    Do this now

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    6. Write an honest result

    5 min

    In 30 seconds
    • Turn evaluation numbers into a clear result paragraph for your project.
    • State dataset, split, baseline, confusion matrix, key metric, and limitation.
    • Avoid claims your validation set cannot support.
    Key point

    One honest result

    Your result should tell a reviewer what you tested, how you tested it, what you compared against, and what still fails.

    Do not write only “95% accurate”. A good result is specific enough that another builder can understand the test without asking you on WhatsApp.

    What to include

    For this track, your model evaluation section needs six items: dataset, split method, baseline, confusion matrix, key metric, and one limitation.

    This is what internship reviewers look for. They want to know if your model works outside the few examples you showed in the demo.

    Your to-do

    Write the section

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 6 done

    Example

    Project description example

    Use this as a plain project README or demo script section. Replace the values with your own numbers.

    The limitation is not an apology. It shows that you know where your test is weak.

    Model evaluation
    
    Dataset: 2,000 labelled support messages from our college helpdesk sample. Labels were spam and not_spam.
    
    Split method: 80/20 random split with a fixed seed. Train: 1,600 messages. Validation: 400 messages.
    
    Baseline: Majority-class baseline predicted every message as not_spam. Baseline accuracy was 72%.
    
    Model result: Logistic regression with TF-IDF reached 89% accuracy on the validation set.
    
    Confusion matrix on validation set:
    - True spam predicted spam: 82
    - True spam predicted not_spam: 30
    - True not_spam predicted spam: 14
    - True not_spam predicted not_spam: 274
    
    Key metric: Recall for spam was 73%. We chose recall because missing spam lets bad messages reach users.
    
    Limitation: The data came from one college-style helpdesk sample, so the result may not hold for messages from other campuses, languages, or festivals when message patterns change.
    Common mistake

    Do not overclaim

    A validation result is not proof that your model will work for every user in India. It only supports the dataset and split you used.

    Avoid lines like “works perfectly”, “detects all fraud”, or “ready for production”. Write what your test actually showed.

    Tip

    Use AI carefully

    You can ask ChatGPT, Gemini, or Claude to turn your metrics into a clean paragraph. But paste the numbers yourself and check every claim it adds.

    AI often makes the result sound stronger than your test. Delete claims about real-world performance, production readiness, or users you did not test.

    Prompt:
    Write a short, honest model evaluation section for my hackathon README.
    Use only these facts. Do not add claims.
    Dataset: [describe]
    Split: [describe]
    Baseline: [score]
    Model: [score]
    Confusion matrix: [numbers]
    Key metric: [metric and why]
    Limitation: [limitation]
    Your to-do

    Do this now

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    7. Submit your evaluated project

    5 min

    In 30 seconds
    • Add a clear evaluation section to your HackIndia project submission.
    • Attach proof: dataset, split, baseline, confusion matrix, metric, and limitation.
    • Make your demo defensible for judges, recruiters, and teammates.
    Key point

    Your proof package

    Your model result is only believable when someone can see how you tested it. Put the evaluation in the repo and in the demo description, not only in your head.

    The minimum proof package is: dataset, split method, baseline, confusion matrix, key metric, and one limitation.

    Where it goes

    Use two places. First, write an Evaluation section in your README or project description. Second, mention the same result in your demo script or video.

    If judges are short on time, they should still understand what the model was tested on and what it cannot do yet.

    Your to-do

    Add the section

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done

    Example

    README template

    Copy this structure. Replace the sample values with your own numbers. Do not keep placeholder text.

    Model Evaluation
    
    Dataset:
    Used 2,400 labelled support messages collected from our demo dataset. Labels: refund, delivery, product, other.
    
    Split method:
    80/20 random split with a fixed seed. Train: 1,920 rows. Validation: 480 rows.
    
    Baseline:
    Majority-class baseline predicts "delivery" for every message. Baseline accuracy: 42%.
    
    Model result:
    Validation accuracy: 78%.
    Key metric: macro F1 = 0.74, because classes are not equally common.
    
    Confusion matrix:
    Rows are actual labels. Columns are predicted labels.
    
                  refund  delivery  product  other
    refund            82        11        5      6
    delivery          14       151       13     10
    product            8        21       72      9
    other              6        19        4     49
    
    Limitation:
    The model was tested only on English messages. It may perform worse on Hinglish or regional language messages.
    Common mistake

    Do not oversell

    Do not write “our model is 95% accurate” without the split, baseline, and confusion matrix. That number can be useless if the data is imbalanced or leaked.

    Do not hide weak classes. If the model misses many refund complaints or fraud cases, say so and explain the risk.

    Tip

    Use AI carefully

    You can ask ChatGPT, Gemini, or Claude to turn your raw results into a short evaluation paragraph. Paste only the numbers you already computed.

    Check that the AI does not invent a dataset size, metric, or limitation. If a number is not in your notebook or script output, do not include it.

    Example

    Demo script line

    Say the result in plain words during the demo. This sounds more credible than only showing a high score.

    We tested the model on a held-out 20% validation split. It beats the majority-class baseline, 78% accuracy versus 42%. The confusion matrix shows it still confuses product and delivery messages, so we would not use it for automatic replies without human review.
    Your to-do

    Do this now

    Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.

    0 of 5 done