Skip to content

AI internships

Building a machine learning portfolio for internship applications

A machine learning portfolio for an internship is two to four projects that a stranger can open, run and understand in about ten minutes. Each needs a clear question, a README that says how to reproduce the result, a baseline to compare against and an honest account of what the model can and cannot do. Below are three project shapes, a checklist and rules for reporting results.

Your first hour with George Li (60 minutes by video, $250) ends with a written plan within one working day.

Book your first hour ($250)

What a portfolio is for at the intern stage

An intern applicant rarely has work experience in machine learning, so a reader looks for evidence that you can do the basic job: take a question, get data, build a model, test it fairly and explain what you found. A portfolio is that evidence in a form the reader can check. It is not a showcase of the most advanced method you can name.

Design it for a reader who gives each repository about ten minutes. That is our assumption about a busy reader, not a measured figure, and it is a useful one because it forces choices: the README must answer the main questions on its first screen, the code must run from a short list of steps and the result must be stated plainly.

A portfolio has two jobs. It makes your resume lines checkable, so a bullet about a classifier on your resume links to the code behind it. And it gives you something specific to talk about in an interview, where you can explain every choice because you made it.

Three project shapes that show skill

Each of the three shapes below shows a different part of the job. A strong portfolio usually holds one or two of them, not all three.

Three project shapes
ShapeWhat it showsWhat a reader checksA common trap
Reproduce a published resultYou can read a paper, implement the method and compare your number with theirsWhether your setup matches the paper, and an honest account of any gapReporting your number without saying where it differs from the original
An end-to-end project on a question you choseYou can frame a question, clean data, model it and evaluate itWhether the question is clear, the split is fair and the baseline is sensibleChoosing a question because the data was easy, with no reason anyone would care
A comparison or ablationYou can design a fair test of two methods or of one componentWhether the comparison is controlled and the spread is reportedComparing methods with different preprocessing, so the difference is the preprocessing

A fourth shape, a small application that lets a person try your model, is worth adding only after one of the three above is solid. It shows that you can ship something, and a reader will still look for the evaluation underneath it.

The Google Machine Learning Crash Course is a practical course, described on its page as a practical introduction to machine learning with videos, interactive visualizations and exercises, whose modules cover regression and classification models, working with numerical and categorical data, datasets, generalization and overfitting, and production systems. It is a reasonable map of what a first project should touch. Following a course is a way to learn the parts; a portfolio piece starts when you choose a question of your own.

The repository and README checklist

The repository is the unit a reader opens, so give each project its own. The README is the first thing they see. Run the checklist below on each project, once as the author and once from a clean copy of the repository, on a machine where you have not installed anything for it.

A repository and README checklist
ItemWhat good looks like
A one-sentence questionThe first line says what the project asks, in plain words, with no jargon the reader has to look up
The result in one paragraphThe main number or finding, the data it came from and the comparison it was measured against
How to run itThree to six commands that work from a fresh copy, with the language version and the package list pinned
Where the data comes fromA link and the license, or a script that downloads it, and never a large file committed by hand
The split and the metricHow the data was divided, which metric you chose and why it fits the question
A baselineThe simplest reasonable approach and its score, so the reader can see what your model added
Errors and limitsExamples where the model fails and what you think the cause is
A fixed random seedThe seed or seeds, so a reader who reruns the code gets the same numbers
A tidy historyCommit messages that say what changed, and no secrets, keys or personal data in any commit

The step most people skip is running the instructions from a clean copy. If it fails for you, it will fail for the reader, who will not debug it.

Reporting results honestly

Honest reporting is the main thing that separates a portfolio a reader trusts from one they discount. The rules below come from basic practice, and the scikit-learn documentation states the first one directly.

  1. Do not score the model on the data it learned from. The scikit-learn page calls learning the parameters of a prediction function and testing it on the same data a methodological mistake, since a model that just repeated the labels it had seen would score perfectly and predict nothing useful on new data. This is called overfitting.
  2. Hold out a test set and look at it once. The page says it is common practice to hold out part of the data as a test set, and that tuning parameters until the estimator performs well on the test set lets knowledge of the test set leak into the model.
  3. Learn preprocessing from the training data only. The page says standardization, feature selection and similar transformations should be learned from a training set and applied to held-out data, and it shows a pipeline that does this inside each fold.
  4. Report the spread, not only the average. Cross-validation gives one score per fold, and the reported measure is the average of those values, so show the individual scores or a standard deviation beside it.
  5. Show a baseline and the failures. A number with no comparison means little, and an example of where the model is wrong tells the reader that you looked.

A worked example of a results line

The scikit-learn page runs five-fold cross-validation on an example and prints five scores: 0.96, 1.00, 0.96, 0.96, 1.00. The table below turns them into the line a README can carry. The mean is 0.976, which the page rounds to 0.98, and the individual scores run from 0.96 to 1.00. These are the documentation’s illustrative numbers on its own example data, not a result of ours.

Five fold scores from the scikit-learn example, as a results line
MeasureValue
Fold scores0.96, 1.00, 0.96, 0.96, 1.00
Mean0.976
Lowest fold0.96
Highest fold1.00
Spread, highest minus lowest0.04

Cross-validation splits the rows into folds and trains once per fold. The table shows how many rows go to training and to scoring in each fold for a few data set sizes, which is also a check on whether a small data set leaves each fold large enough to mean anything.

Rows per fold in five-fold cross-validation
Rows in the data setRows used to train each timeRows used to score each timeRows scored across all five folds
1008020100
500400100500
10008002001000

Every row is scored exactly once across the five folds, and every row is used for training in four of them. A model that takes an hour to train costs five hours to cross-validate with five folds, which is worth knowing before you start.

Where to link it

A portfolio only helps if the reader finds it. Put the link in the header of your resume next to your email, and put the link to the specific repository beside each project bullet. Check that every link opens when you are signed out of your own account.

GitHub’s documentation describes a profile README: a repository whose name matches your username, that is public and that holds a README.md file with content in its root. Its contents appear on your profile page. Use it as a short page of orientation, not a biography: one line about what you work on, and links to your two or three best repositories with a sentence on each.

  • Resume header: one link to your profile and a link beside each project to its repository.
  • Application forms with a link field: the profile README, so a reader who clicks lands on your orientation page.
  • Messages to a lab or an engineer: one repository that matches what they work on, with one sentence on why, and not a list of everything.

Questions

How many projects does a portfolio need?

Two to four is enough. One finished project that a reader can run and understand does more for you than six that are half done, and every project you list is one you may be asked to explain.

Should I use a famous dataset?

You can, but then the question and the analysis have to be yours. A common dataset shows that you can follow a tutorial, so add a comparison, an error analysis or a different question that you can explain.

What is data leakage?

It is information from the held-out data getting into training, for example by fitting a scaler on all the data before splitting it. The scikit-learn documentation says preprocessing should be learned from the training set and applied to held-out data, and its pipelines help with that.

How a session helps

In an hour ($250) George reads one of your repositories the way a reader would, tells you where he got lost and asks the questions an interviewer might ask about your choices. You write every word and send every message yourself. Your first purchase is refundable for unused time within 7 days. For where this fits in a search, see the AI internship guide and the internship resume guide, and the college students page and the packages page list the sessions.

Want help with your own applications? See a career coach for college internships, internship interview coaching, or resume review for internships.

Start with one hour

  • Your first purchase is refundable for unused time within 7 days. Nothing renews. Refund terms