Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
thangckt committed Dec 27, 2024
1 parent efaa0f6 commit 797e0d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 31 deletions.
37 changes: 6 additions & 31 deletions notebook/0_basic_MLDL/1_0_ml_overview.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
"source": [
"# Machine Learning\n",
"\n",
"Overview of Machine Learning\n",
"\n",
"We will learn about how machine learning is a method of modeling data, typically with predictive functions. Machine learning includes many techniques, but here we will focus on only those necessary to transition into deep learning. For example, random forests, support vector machines, and nearest neighbor are widely-used machine learning techniques that are effective but not covered here.\n",
"\n",
"What is about the model ?\n",
"Machine learning is a method of modeling data, typically with predictive functions. Machine learning includes many techniques, but here we will focus on only those necessary to transition into deep learning. For example, random forests, support vector machines, and nearest neighbor are widely-used machine learning techniques that are effective but not covered here.\n",
"\n",
"We want a model capable of handling our `inputs` and producing something in the shape of our `ouputs`."
]
Expand Down Expand Up @@ -154,7 +150,7 @@
"- The patterns: the learned parameters in model, or the parameters to find in the relationship between inputs and outputs. For e.g., in linear model $y = ax +b$, the learned patterns (paramters to be found) are the weight `a` and the bias `b`.\n",
"- Hidden units: neurons in hidden layers\n",
"- Hypeparameters: are all user-choice parameters in model (e.g., learning rate, number of layers, number of neuron in layers,...)\n",
"- Epoch: step\n",
"- Epoch: optimize step\n",
"- Loss function: measures how wrong your model predictions are. The higher the loss, the worse your model. It is sometimes calles \"loss criterion\", \"criterion\", or \"cost function\"."
]
},
Expand Down Expand Up @@ -187,30 +183,12 @@
"4. **Perform backpropagation on the loss** - Computes the gradient of the loss with respect for every model parameter to be updated (each parameter with `requires_grad=True`). This is known as backpropagation, hence \"backwards\" (`loss.backward()`).\n",
"5. **Step the optimizer (gradient descent)** - Update the parameters with `requires_grad=True` with respect to the loss gradients in order to improve them (`optimizer.step()`)."
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "6VivsLTmHC8B"
},
"source": [
"# Libraries to use\n",
"- `sklearn` for ML model. This package is widely used and has implemented almost ML model: Random Forest Regression,... \n",
"- `pytorch` for DeepML model\n",
"- There is also a package `skorch` to convert `pytorch` models to `sklearn` models, then some penefits from `sklearn` lib can be used. [Read more](https://machinelearningmastery.com/use-pytorch-deep-learning-models-with-scikit-learn/)"
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "-pHHUipwYc4f"
},
"execution_count": null,
"outputs": []
}
],
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"display_name": "base",
"language": "python",
Expand All @@ -225,11 +203,8 @@
"interpreter": {
"hash": "2b6e7cfdce5ef245d32482b7f80393907c6182a3f3a40203474e09cb3d62b454"
}
},
"colab": {
"provenance": []
}
},
"nbformat": 4,
"nbformat_minor": 0
}
}
9 changes: 9 additions & 0 deletions notebook/reference.bib
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ @book{straub2020mathematical
edition = {2.0},
url = {libgen.li/file.php?md5=cd0265c48972d1b31f0f810f1710c3d4}
}


@misc{nilsson2015introduction,
title = {Introduction to Machine Learning},
author = {Nils J. Nilsson},
url = {https://ai.stanford.edu/~nilsson/mlbook.html},
note = {\href{https://ai.stanford.edu/~nilsson/mlbook.html}{(Link)}},
accessdate = {Dec 28, 2024}
}

0 comments on commit 797e0d4

Please sign in to comment.