Vectorized operations and statistics on an array
Computing the mean and standard deviation and normalising columns without Python loops.
AI Code Explorer
Code examples at five levels (beginner, intermediate, advanced, research, applied); each example has a goal, commented code, requirements and how to run it. 61 of the 69 examples were actually run and their output recorded.
Computing the mean and standard deviation and normalising columns without Python loops.
Handling missing values and computing statistics for each diagnosis group.
Finding out whether the difference between two models' accuracies across cross-validation folds is statistically significant.
Building a query plan that Polars optimises before execution.
Splitting a table into partitions and computing an aggregation on them in parallel.
Producing a publication-quality figure of the two loss curves.
Comparing a variable's distribution between two groups in one line.
Training a classifier with feature scaling inside a pipeline to avoid data leakage.
Choosing model hyperparameters with cross-validation, then evaluating on a separate test set.
Computing the metrics that matter to a physician, not accuracy alone.
Stopping the addition of trees when the validation set stops improving.
Training a model on categorical columns without one-hot encoding.
Passing categorical text columns to the model as they are.
Balancing classes on the training data only, in each fold.
Searching for the best hyperparameters with the TPE algorithm instead of grid search.
Letting the library choose the model and its hyperparameters within a set number of seconds.
Understanding how PyTorch computes derivatives automatically.
Writing the training and evaluation loop by hand on synthetic data.
Building a data pipeline in the standard PyTorch style and training a convolutional network.
Implementing the squash function and the routing-by-agreement algorithm between capsules as in the paper by Sabour et al. (2017).
Moving the model from the training environment to a standalone inference environment and checking that the outputs match.
Preparing an image with the standard transforms and passing it to ResNet-18.
Listing the available models and creating a small ViT with a custom number of classes.
Applying transforms to a batch of tensors with gradients able to flow through them.
No code runs on the site's server; copy the example and run it on your machine or in a Jupyter notebook. Examples marked “not run” need a GPU or large model downloads, so check them against the official documentation.
Sections
No section has this name. Press “Search” to search all site content.
Favourites
My results & certificates
My academy progressMy quiz resultsKids’ progressAcademy certificatesQuiz certificatesStart any lesson or quiz and it will show up here so you can get back to it quickly.
Settings
I am the AI Frameworks & Libraries Assistant. Describe your project or ask me about a library, a comparison or a code example, and I will answer from the encyclopedia's database with links and sources.
Answers from the encyclopedia's database only, without a language model and without sending your question to any third party.
The assistant can make mistakes, so check the attached sources.