本文參考自:

透過lazypredict這個套件,我們可以用短短幾行程式,針對我們的dataset,進行訓練,並呈現出多種Regression或Classification算法的測試結果

安裝

pip install lazypredict

使用

# Classificationfrom lazypredict.Supervised import LazyClassifier
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split

data = load_breast_cancer()
X = data.data
y= data.target

X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=.5,random_state =123)

clf = LazyClassifier(verbose=0,ignore_warnings=True, custom_metric=None)
models,predictions = clf.fit(X_train, X_test, y_train, y_test)

print(models)
# Regressionfrom lazypredict.Supervised import LazyRegressor
from sklearn import datasets
from sklearn.utils import shuffle
import numpy as np

boston = datasets.load_boston()
X, y = shuffle(boston.data, boston.target, random_state=13)
X = X.astype(np.float32)

offset = int(X.shape[0] * 0.9)

X_train, y_train = X[:offset], y[:offset]
X_test, y_test = X[offset:], y[offset:]

reg = LazyRegressor(verbose=0, ignore_warnings=False, custom_metric=None)
models, predictions = reg.fit(X_train, X_test, y_train, y_test)

print(models)


分享了瑕疵檢測專案會用到的技術

Labeling: Auto Labeling: YOLO-Base
Training: 非監督學習、Few-shot learning、AutoML
Inference: CUDA & TensorRT

這場分享介紹了Optuna這個自動找超參數的工具,可以和多個常用的深度學習framework整合。

# 安裝
$ pip install optuna
# 安裝dashboard
$ pip install optuna-dashboard
$ optuna-dashboard sqlite:///db.sqlite3
更多介紹可參考optuna的官方repo


在這場分享當中,來自Linker Networks的講者介紹了許多在Edge端進行Deep learning Model Deployment的工具,以下僅做簡單紀錄:

除此之外,將模型保存成FP16的格式,可以大幅度的提升模型推論時的FPS。

Azure Custom Vision: Quick POCnvidia-TLT: GO to MarketSelf-Built model: CustomizationTensorRTTriton ServerDeep Stream


有時候在寫Python程式碼的時候,時常因不注意,造成程式碼的style變化,這會讓讀程式碼的人感到不舒適,可讀性不佳。例如:以下print出hello的寫法雖然對電腦來說,輸出都是一樣的。但是對人類來說可能會對多出的空格感到疑惑,是不是程式碼有寫錯,也因此freecodecamp介紹這個名為black的工具可以自動排版程式碼,解決這些問題。

print('hello')

print( 'hello' )
pip install black
black sample_code.py #單個py檔案
black folder_name/ #多個py檔案


Open the Command Prompt and type the following command, it will generate a battery status report. You can learn some interesting facts inside the report.

Also, You can generate the report weekly with task scheduler and add the html page to your bookmark in your browser.

powercfg/batteryreport

wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.shbash Anaconda3-2020.11-linux-x86_64.sh/# Press Enter and Yes according to the terminal outputexport ANACONDA=/home/USERNAME/anaconda3
export PATH=$PATH:/home/USERNAME/anaconda3/bin
conda info

wandb

Tracking ML experiment result (Useful for DL project)

cudf

GPU version of Pandas

pandas-profiling

Check the dataset before you dive into it. (Useful for ML project)

metaflow

Why metaflow

Prefect

Very similar to metaflow

ETL with Prefect

MLFlow

  • Tracking experiments to record and compare parameters and results (MLflow Tracking).
  • Packaging ML code in a reusable, reproducible form in order to share with other data scientists or transfer to production (MLflow Projects).
  • Managing and deploying models from a variety of ML libraries to a variety of model serving and inference platforms (MLflow Models).
  • Providing a central model store to collaboratively…

Yanwei Liu

Machine Learning / Deep Learning / Python / Flutter cakeresume.com/yanwei-liu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store