Install homebrew
- install xcode
- install homebrew
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew doctor
Your system is ready to brew.
Your system is ready to brew.
Install python 3 (it has pip3)
$ python --version
Python 2.7.15
$ python3 --version
$ brew install python3
$ python3 --version
$ python3
>> print("hello world")
>> quit()
>> print("hello world")
>> quit()
$ pip3 install -U pip
(optional) Virtual Environments with build-in venv
$ mkdir ~/.virtualenvs
$ python3 -m venv ~/.virtualenvs/myvenv
$ source ~/.virtualenvs/myvenv/bin/activate
(myvenv) $
(myvenv) $ deactivate
$ mkdir ~/.virtualenvs
$ python3 -m venv ~/.virtualenvs/myvenv
$ source ~/.virtualenvs/myvenv/bin/activate
(myvenv) $
(myvenv) $ deactivate
Scikit-learn
https://scikit-learn.org/stable/install.html
$ pip3 install -U pandas
$ pip3 install -U matplotlib
$ pip3 install -U numpy
$ pip3 install -U scipy
$ pip3 install -U scikit-learn
$ pip3 install -U numpy
$ pip3 install -U scipy
$ pip3 install -U scikit-learn
Tensorflow
https://www.tensorflow.org/install/pip
$ python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
$ python3 -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"
Jupiter Notebook
$ pip3 install -U jupyter
$ jupyter notebook
Metrics
TP: true positive
FP: false positive
FN: false negative
precision = TP / (TP+FP)
recall = TP / (TP+FN)
f1 = 2 * precision * recall / (precision + recall)

