Category AI

83. Precision/Recall Tradeoff

How do you decide a threshold for, let’s say classification? The higher the threshold, the lower the recall, but the higher the precision, and vice versa. This is called the Precision/Recall Tradeoff. One way is to plot all possible thresholds.…

82. Data Cleaning Methods

Here are some methods for cleaning data when using pandas dataframe: Delete data with empty district df.dropna(subset=[“COLUMN_NAME”]) Delete the whole attribute which includes empty data df.drop(“COLUMN_NAME”,axis=1) Replace empty data with other elements(Such as median) median = df[“COLUMN_NAME”].median() df[“COLUMN_NAME”].fillna(median,inplace=True) When replacing…

81. ML Project Workflow

There are 8 main steps: Frame Problem and Look at the Big Picture Get Data Explore data to gain insights Prepare the data to better expose the underlying data patterns to Machine Learning Algorithms Explore many different models and shortlist…

80. Shift in Recommendation Filtering

Over the last several years, there has been a trend in recommendation systems shifting from COLLABORATIVE FILTERING to CONTENT-BASED FILTERING. Each workflow are the following. Let’s say we want to recommend a restaurant to a user. Collaborative Filtering 1. looks…

79. Generate TensorRT Engine with Unet

Here is 1 way to Generate an engine file with Unet Pre-requisites – Deepstream 5.0.1 – TensorRT 7.1.3 – Jetson XAVIER NX – CUDA 10.2 Load Model import torch unet = torch.hub.load(‘milesial/Pytorch-UNet’, ‘unet_carvana’, pretrained=True) unet.eval() Export Model path_to_onnx =”” dummy…

75. MLOps Deployment Example

Let’s say we want to detect whether there are any scratches on a smartphone(Example from MLops Specialization by Andrew NG). In this case, MLops would go something like this. Fig.1 – MLOps Capture Image of Smartphone The Inspection software inside…

74. Visualize Your ONNX model using Netron

Just simply, go to the link and select the onnx model you want to visualize. When converting your model, for example, TENSORFLOW1 ⇒ tensorRT engine You may want to check your input/output dimensions in case something unexpected is happening when…

72. Challenges of Edge AI

4 Challenges of Edge AI Vulnerable Security Feature Due to scattered locations, more security is required. Limited Machine-Learning Power Edge device with low computing power (compared with the cloud) leads to under-delivery considering performance. Model Sync Delay when updating the…

71. The Drivetrain Approach

To make sure the model you are creating is actually practical, there is method called the Drivetrain Approach introduced by Jeremy Howard. The steps are the following: Defined Approach- What outcome am I trying to achieve? Levers – What inputs…