Python ML and DL

Python Resources

 

Spoken tutorial IIT Bomabay

MIT.edu

Good Resources: Python Programming

https://www.guru99.com/

 

https://www.leadingindia.ai/resources/

 

https://docs.python.org/3/py-modindex.html


 

# Import necessary packages
import numpy as np
import pandas as pd
import seaborn as sb
import matplotlib.pyplot as plt
% matplotlib inline
import warnings
warnings.simplefilter(“ignore”)
from sklearn import linear_model
from sklearn.ensemble import RandomForestClassifier
import xgboost
from sklearn.metrics import explained_variance_score
from xgboost import XGBClassifier

_______________________________________________

pip list | grep -F package_name
import sys
print(sys.version)
!pip freeze  ( list of modules)   or
!pip list
import fastai
print(fastai.__version__)
import pandas
print( pandas.__version__)
help(modules)
pip list | grep -F package_name

https://github.com/BadreeshShetty/Data-Visualization-using-Matplotlib

TypeError: stackplot() got multiple values for argument ‘x’

from matplotlib import pyplot as plt
plt.stackplot([1,2,3], [1,2,3])

Should be equivalent to

fig, ax = plt.subplots()
ax.stackplot([1,2,3], [1,2,3])

 

 


FASTAI

How to install fastai v1 on Windows 10

 

————————————

https://paperswithcode.com/sota
———————————————

To see packages with pip

pip freeze

 

import torch
torch.cuda.is_available()

————————-

Julia

https://julialang.org/downloads/ + Juno

using Pkg
Pkg.add(“IJulia”)

using IJulia
notebook()

https://github.com/JuliaLang/IJulia.jl

 

 

!pip install –upgrade tensorflow

!pip –version

conda create -n Python27 python=2.7
source activate Python27

%%file  abc.py ( Create File Name)

 

!python abc.py ( To run)

 

___________________________

conda install -c aaronzs tensorflow-gpu
conda install -c anaconda cudatoolkit
conda install -c anaconda cudnn
conda install -c anaconda cudatoolkit

 

—————————

at first time, anaconda install cuda9 for me.
after run conda install -c anaconda cudnn, it shows cudnn 7.14 for cuda 8 is installed, also cuda 9 will be down to cuda8.

 

import sys
sys.version

or

!python -V

 

import warnings
warnings.simplefilter(action=”ignore”, category=FutureWarning)

 

# keras imports
from keras.applications.vgg16 import VGG16, preprocess_input
from keras.applications.vgg19 import VGG19, preprocess_input
from keras.applications.xception import Xception, preprocess_input
from keras.applications.resnet50 import ResNet50, preprocess_input
from keras.applications.inception_resnet_v2 import InceptionResNetV2, preprocess_input
from keras.applications.mobilenet import MobileNet, preprocess_input
from keras.applications.inception_v3 import InceptionV3, preprocess_input
from keras.preprocessing import image
from keras.models import Model
from keras.models import model_from_json
from keras.layers import Input

# other imports
from sklearn.preprocessing import LabelEncoder
import numpy as np
import glob
import cv2
import h5py
import os
import json
import datetime
import time

 

 

********************************************

COLAB:

 

from google.colab import drive

drive.mount(/content/drive/)

 

!ls “/content/drive/My Drive/”

!ls “/content/drive/My Drive/Colab_MyDataset”

 

!python3 “/content/drive/My Drive/Colab_MyDataset/Vikas_Testing_Malaria/malaria_cell_classification_code/feature_extraction.py”

 

!wget https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/master/csv/datasets/Titanic.csv -P “/content/drive/My Drive/Colab_MyDataset”

 

Change Directory

import os
#os.chdir(“drive/app”)

os.chdir(“drive/My Drive/Colab_MyDataset/Vikas_Testing_Malaria/malaria_cell_classification_code”)

COLAB.Research.google.com

——————————————-

PU Rohan MSC. Dept

 

from google.colab import drive

drive.mount(‘/content/drive/’)

import os
#os.chdir(“drive/app”)

os.chdir(‘/content/drive/My Drive/COLAB_NOTEBOOKS/PU_Rohan’)

————————–

from google.colab import files
uploaded = files.upload()

******************************************

References

Stock Prices Prediction Using Machine Learning and Deep Learning Techniques (with Python codes)

https://www.linkedin.com/pulse/fastai-intro-machine-learning-coders-part-1-2018-eric-perbos-brinck

 

https://towardsdatascience.com/fast-ai-lesson-1-on-google-colab-free-gpu-d2af89f53604

 

How to Setup Your Python Environment for Machine Learning with Anaconda

 

https://hackernoon.com/fast-ai-machine-learning-lecture-1-notes-3ca45cec4235?gi=1bc80b260ce1

https://elc.github.io/posts/fastai-colab-deep-learning/

https://elc.github.io/posts/fastai-colab-deep-learning/

https://elc.github.io/posts/fastai-colab-deep-learning/

https://github.com/parulnith/machine-Learning-solutions/blob/master/Classification/Mushroom%20Classification/Mushroom%20Classification%20Problem.ipynb

https://github.com/chungbrain/Google-Colab-with-GPU

https://github.com/parulnith/100-Days-Of-ML-Code

https://github.com/iitkliv

https://github.com/jakevdp  ( Data Science)

https://github.com/Avik-Jain

https://github.com/duggalrahul/AlexNet-Experiments-Keras#requirements

http://web.stanford.edu/class/ee368/Project_Spring_1314/

http://web.stanford.edu/class/ee368/Project_Spring_1314

/https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/lecture-slides-code/

%d bloggers like this: