95p
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Exam Questions Machine Learning for the Natural Sciences :atom_symbol: Sadly, we do not have much training data (past exams) :worried:. But we can generate our own 🎉. Just think about what questions you would ask if you had to make an exam and write them done. Just questions, no answers. ## Syntax Example question: * Risk * Explain what **risk** is. * How is expected risk defined? * How can it be approximated? Example multiple choice question: * What would be useful features for predicting tomorrow's weather * [ ] A vector with the temperatures of the past hours and days * [ ] A vector with wind speeds of the past hours and days * [ ] An integer of how many people finished their meal today You can use math like normal $\LaTeX$ $f(x) = \frac{1}{x^2}$ If you think that there should be a question about a particular topic or aspect, but just can't think of one: * :thinking_face: Connection between Extended-Connectivity Fingerprints and Graph Convolutions for Molecules ## Lecture 02 - Decision trees, ensemble methods * :star: List the steps of the greedy training algorithm for decision trees. * :star: Assume you are training a decision tree using a greedy training strategy and n data points each with k features. Derive and explain the average scaling of the runtime of the algorithm in n and k to train the root node? What is the average depth of the full tree? How does the runtime scale to train the full decision tree (ignore constant prefactors)? Explain all answers. * How to predict the response variable of an unseen data point using a decision tree for categorical and continuous features? (Inference) * If we scale the features of the training data, how do the predictions of the decision tree change? * Impurity Measures: * Give the formula for entropy. * Give the probability of missclassifying a sample with a decision tree. * Give the formula for Gini-Impurity * Regularization: * How can decision trees be regularized? (5 things) * Which problem can arise when using information gain as a stopping criteria for decision tree training? Describe a dataset for which the problem occurs. * Wherein lies the problem when training on correlated features? * Ensemble Methods: * Explain the differences between bagging and boosting during training and inference * Derrive the Bias-Variance Decomposition start with the expected error. * Assume that the model predictions are identically distributed. Show that an ensemble has at most the expected error of a single model. What is the expected error if the models are also independent? * How can you estimate the generalization error of an ensemble "intrinsically"? * How can you interpret the predictions of a random forest? Explain two approaches. * Explain three approaches for measuring feature importance ## (Lecture 03 - Mathematical foundations) ## Lecture 04 and 05 - Machine learning basics * Explain the steps necessary to derive the weights for linear regression. State the formula for the initial problem. It is not necessary to do all the calulation steps or state the solution. * Regularization: * Explain Underfitting and Overfitting * Why can't you optimize hyperparameters that limit the model capacity on the training set? * How should the loss curves of a model change after adequate regularization? * Assume you're doing a k-fold cross-validation, on which subsets of the data would you optimize a hyperparameter? * Losses & Metrics: * Draw the (expected) ROC curve of a classifier that outputs uniformly random predictions in a two class setting. Do not forget axis labels Hint: Given the same model. For any subset of the data how many positives and negatives have been classified as positives (on average)? * Assuming $p(y | x, \theta) \sim \mathcal{N}(\hat{y}, \sigma^2)$ show that maximizing the likelihood is equivalent to minizing the MSE. * Show that $\underset{\theta}{max}~p(x;\theta) = \underset{\theta}{min}~\text{NLL}(x; \theta) = \underset{\theta}{min}~\text{KL}(p_{data} || p_{model})$. * NLL = negative log-likelihood * $p(c_j | x) = \frac{e^{z/T}}{\sum_i e^{z_i/T}}$ is the so called temperature-scaled softmax. Why is it called that way? * How to measure Accuracy? * Basic Models: * Why is feature selection particularly relevant for k-NN? * Perform the kernel trick for an SVM. * Give the mathematical model of logistic regression. * Derrive the Normal Equation by minimizing the MSE * How does the k-means clustering algorithm work? * Give an example of a geometric scaling law w.r.t to the number of dimensions and relate it to the curse of dimensionality in machine learning. * Show that an unsupervised problem can be expressed as supervised problems and vice versa. ## Lecture 06 - Neural networks * What activation functions would you use for a multi-class classification head? * Why is L1 Regularization also called Least absolute shrinkage and **selection operator** (Lasso)? * Say you chose an optimization algorithm that relies on curvature information (e.g. BFGS), which activation function should you **avoid** for your network and why? What would be a close alternative? * Could you put an L1-Penalty on the **representations** of your network and achieve similar results to a lasso objective? Why? Why not? * Why is Ridge Regression also called "weight decay"? * Give an example of multi-task learning seen in the lecture and explain how it affected the shared representations. * Say you wanted to reduce the model capacity of a deep neural net without changing the model size, how would you do that? * How can you get an uncertainty estimate (variance) from a single Neural Network? You are alowed to infer multiple times. (Hint: How would you do it for a random forest?) ## Lecture 07 - Nano-scale simulations with neural networks * Give a few examples of nanoscale phenomena that can be simulated. * What kind of forces and interactions occur in a multi-particle system? * Name three classical methods for atomic resolution * If you have a network predicting the energy of a system, how can you make a next step prediction of the particle positions? * Why use machine learning for atomic simulations? * What is the problem with representing a molecule as a vector of inverse distances between it's atoms? * How to create off-equilibrium molecule datasets for atomic simulation? Explain two approaches and compare them. ## Lecture 08 - CNNs and medical image data * :star: What are the components of a ResNet block (drawing is encouraged)? What is the purpose of skip connections in the ResNet architecture? * Give an example for an up-convolution that maps a 2D vector to a 5D vector * You want to do segmentation of cell images. Why are up convolutions necessary? * What is a "valid" convolution and what is it's output size? * What would be an advisable precaution when training a CNN with very many layers * How can you predict the electron density using a CNN? * What type of architecture could you use for segmenting CT scans? * What is the result of the deconvolution $\begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix} \oslash \begin{bmatrix} 1 & 1 & 1 \\ 1&1&1\\ 1&1&1\\\end{bmatrix}$ ## Lecture 09 - RNNs and reaction prediction * Write down the operations for an LSTM-Cell * What is an advantage of GRU over LSTM-Cells? * What is the similarity between seq2seq models and autoencoders * What problem of RNNs does the attention mechanism solve? * What is an attention matrix and how can you interpret it? ## Lecture 10 - Graph neural networks and molecular representations * :star: You have a very large dataset of molecules and their properties, e.g. their toxicity. You want to train a machine learning model to predict that property. Rank the following ML models according to their expected accuracy, and explain your ranking: * a) Feed-forward neural network with molecular fingerprints as input vectors * b) Graph neural networks which learn directly from the adjacency matrix and the molecular geometry * c) Easy-to-compute molecular features concatenated to a feature vector used as input for a random forest regression model * SMILES syntax * Draw the molecule described by the SMILES code O=Cc1ccc(O)c(OC)c1 * Write down a different SMILES code for the same molecule * Write down a SMILES code for dopamine ([result](https://www.guidetopharmacology.org/GRAC/LigandDisplayForward?ligandId=940)) ![](https://i.imgur.com/5c23VCm.png) * GNNs * Explain a basic message passing operation. * Say you were using a Graph Neural Network to predict the bioavailability of a drug. How can you modify the message passing operation to get predictions that are invariant to actions of $\mathbb{E}(3)$ on the 3D molecular structure? (see. Satorras 2021) * Molecule Fingerprints * Explain how the extended connectivity fingerprint is constructed * How is the neural graph fingerprint constructed? * How do the representations differ? ## Lecture 11 - Autoencoders and generative models * What problems occur when using just the loss function $\|(x-g(f(x)))\|_2$ for a vanilla autoencoder. How can this problem be fixed. * What is the learning objective of a contractive autoencoder? Write down the formula and explain the intuition behind it. * Explain what the data manifold is. Give an applicatoin example of an relativly big and for an relativly small data manifold. * What architecture should be used for multiobjective design of molecules? * Give the adverserial loss and the training objective of a GAN ## Lecture 12 - Bayesian methods for autonomous experiments * Explain (with formulas) the two steps of Baesian learning * How would you create the following plot of a gaussian process (uncertainty bands + sample functions)?: ![](https://i.imgur.com/jkCDpWr.png) * Make an example of a gaussian process with two data points and an unseen sample $x^*$. Explain how to infer $f(x^*)$ given the data. * How to construct an acqustion function (Upper Confidence Bound Approach)? * How to construct an acqustion function (Expected Improvement Approach)? ## Lecture 13 - Reinforcement learning * How could you model the market share of three different companies making up the whole market over time with a markov model? What share does each company posess in the equilibrium state? * Given an action A with an immediate reward of 10 and an action B with an unknown reward R two steps later. Given a discount factor of 0.5, how large does R at least have to be for the agent to choose action B? * Derrive the recursive definition of the value function and solve it. * What are the two components of the bellman equation? * What do the rows and columns of a Q table represent? * What is the difference between the value function and the Q function

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully