🍀 My Path to Machine Learning 🍀 |
---|
💡 Do not follow where the path may lead. Go instead where there is no path and leave a trail. Ralph Waldo Emerson |
What Is Machine Learning? |
---|
📗 Machine Learning is the science (and art) of programming computers so they can learn from data. |
📘 A slightly more general definition: Machine Learning is the field of study that gives computers the ability to learn without being explicitly programmed (Arthur Samuel-1959) |
📙 A more engineering-oriented one: A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E (Tom Mitchell-1997) |
Numpy, Pandas, and Matplotlib:
Classification and Regression with Scikit-learn:
Classification and Regression Using SVM:
Clustering:
PCA and SVD:
Train, Validation and Test Sets in Machine Learning:
Algorithms and Models in Machine Learning:
Evaluation Metrics or Loss Functions for Regression:
Datasets and Projects in Machine Learning:
Good Resources to Find Datasets:
Some Useful Blogs:
Anaconda:
Install Miniconda3 on Linux:
Download the latest shell script:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
Make the miniconda installation script executable:
chmod +x Miniconda3-latest-Linux-x86_64.sh
Run miniconda installation script:
./Miniconda3-latest-Linux-x86_64.sh
1️⃣ conda --version
(in a terminal command line) ➡️ Conda version number (if it is installed properly).
2️⃣ conda update conda
and then y
(if needed) ➡️ Update conda to the current version.
conda --version
in the Command Prompt, I encountered conda is not recognized as an internal or external command, operable program or batch file
. This issue was resolved by Method 3 of this page.Some useful terminal commands:
1️⃣conda create --name envname
or conda create -n envname
➡️ Create the environment "envname".
2️⃣ conda activate envname
➡️ Activate the environment "envname".
3️⃣ conda info --envs
➡️ A list of all your environments (active environment with an asterisk (*)).
4️⃣ conda install pkgname
➡️ Install the package "pkgname" in the active environment.
5️⃣ conda list -n envname
or conda list
➡️ A list of all packages installed in the active environment.
6️⃣ conda list -n envname pkgname
➡️ To see if the package "pkgname" is installed in "envname".
7️⃣ conda install --revision=0
or conda install --rev 0
➡️ Restore active environment to the default version.
8️⃣ conda deactivate
➡️ Deactivate environment.
9️⃣ conda remove --name envname --all
➡️ Remove the environment "envname".
If you encontered the Error 403 while conda update conda
or conda create -n envname
:
conda config --add channels conda-canary
conda config --remove channels defaults
or refer to Troubleshooting (403 Error).
Python and Jupyter Lab
Python Installation (by a terminal command line): Type conda install python=vnumber
to install version "vnumber" of Python in the active environment.
Jupyter Lab Installation (by a terminal command line): Type conda install jupyterlab
to install Jupyter Lab in the active environment.
Use jupyter lab
to start Jupyter Lab.
python -m ipykernel install --user --name envname --display-name "Python (envname)"
Installing packages from conda-forge:
conda config --add channels conda-forge
➡️ Register the conda-forge channel as a package source for conda
conda config --set channel_priority strict
➡️ Activate the strict channel priority.
Python:
GitHub Repository: Practical Python
Installation of python libraries:
conda install "libname"
:Some libraries could not be installed with the above command line. Then, you can either do `pip install
"libname"` or download the source and install that manually as follows.
Installing libraries manually:
Download the source file of the library containing the file setup.py
➡️ Launch the anaconda prompt and
navigate to the folder that contains the extracted downloaded files , e.g., with the command cd /d d:\anaconda3\tflearn- master
➡️ Run python setup.py install
Colab:
A good approach to import local datasets into the Colab:
1️⃣ Compress the dataset, i.e., as a `zip` file 2️⃣ Upload the compressed file to your Google drive 3️⃣ Mount your Google drive into the colab 4️⃣ Unzip the compressed file in Colab.
A good approach to unzip dataset files from Google drive into the content folder in colab:
```
import os
if not os.path.exists("/content/dataset"):
print("unzip files!")
!unzip -q "/content/drive/My Drive/dataset.zip"
```
To prevent Google Colab from disconnecting:
Google Colab notebooks have an idle timeout of 90 minutes and absolute timeout of 12 hours. This means, if user does not interact with his Google Colab notebook for more than 90 minutes, its instance is automatically terminated. Also, maximum lifetime of a Colab instance is 12 hours.
To prevent Google Colab from disconnecting, Open developer settings in your web browser with `Ctrl+Shift+I` ➡️ Click on console tab ➡️ Type the following code block in the console prompt:
function ClickConnect(){
console.log("Working");
document.querySelector("colab-toolbar-button").click()
}setInterval(ClickConnect,60000)
Markdown:
Git:
Books:
Other good resources:
Other useful links:
SQLAlchemy Admin for Starlette/FastAPI
work with Tehran stock exchange data in Python
In this repository, I include all my notes and whatever I learn, so that everyone can benefit from them
Python Engineer Roadmap
SelfUp is a free and open source project to helps us become the better version of ourselves.
A simple Aparat Video Downloader Script
Coefficient of Variation (CV) and Coefficient of Quartile Variation (CQV) with Confidence Intervals (CI). Python port of https://github.com/MaaniBeigy/cvcqv)
Computer vision and Deep learning