Jingbiao's Blog

「Hinc lucem et pocula sacra」

Cross entropy and KL divergence (relative entropy)

\( \require{amstext} \require{amsmath} \require{amssymb} \require{amsfonts} \newcommand{\eg}{\textit{e}.\textit{g}.} \newcommand{\xb}{\mathbf{x}} \newcommand{\yb}{\mathbf{y}} \newcommand{\xbtn}{\ti...

Gaussian Process with GPML toolbox

Statistical machine learning

\( \require{amstext} \require{amsmath} \require{amssymb} \require{amsfonts} \) Function initialization 1 2 3 meanfunc = @meanZero; % zero mean function covfunc = @covSEiso; % Squared E...

Edge Detections implementation details

Computer visions

1D Edge Detection and the optimizations Simple method: Computing gradient However, with high frequency noises, the gradient could be even more noisier Therefore, Gaussian Smoothing is applie...

ROC Curves and Precision-Recall Curves

Summary ROC Curves summarize the trade-off between the true positive rate and false positve rate for a predictive model using different probability thresholds. Precision-Recall cu...

Threshold Moving - Finding optimal threshold for classification

Introduction Balanced class A class label is being predicted within a classification task. Most of the time, a threshold of 0.5 is used. Larger than 0.5 for one class (1), smaller than 0.5 for ano...

Argparser python usage

import 1 import argparse Initialise argparser 1 parser = argparse.ArgumentParser() Add arguments for the parser 1 2 parser.add_argument('--value', '-v', type=str, default='def', ...

Issue with transformer and Pytorch conflicts

In one project, the transformers package has to be version:transformers==3.5.1, and Pytorch has be >= 1.8.0 - Installing the legacy version may have some conflicts, but anaconda sh...

Issue with python JSONDecodeError

Issues Json loader issue When inputting json file into python with json.loads(_), 1 [json.loads(jline) for jline in open(path, "r").read().split('\n')] line 36 of hm_data.py a like...

Json with python

Read Json files in python Json files with no spaces or newlines Inputting json file into python with json.loads(_), Store a dictionary of a dictionary 1 2 3 # Store the json...

Paddlepaddle installation issues and fixation

Issues Conda do not have the correct version for installing paddlepaddle gpu. In order to get the correct version you need to use pip. While using pip, cudnn is not installed, and environmental var...