menu
The Term of "Heap"

date_range Feb. 15, 2019 - Friday

The term “heap” was originally coined in the context of heapsort, but it has since come to refer to “garbage-collected storage,” such as the programming languages Java and Lisp provide.

The heap data structure in MIT 6.006 is NOT garbage-collected storage.

[CS229] Lecture 4 Notes - Newton's Method/GLMs

date_range Feb. 14, 2019 - Thursday

  1. Newton’s Method,
  2. Generalized Linear Models

[CS229] Lecture 3 Notes - LWR/Prob Interp/Logistic/Perceptron

date_range Feb. 12, 2019 - Tuesday

  1. Locally Weighted Regression
  2. Probablistic Interpretation of LR
  3. Classification (Logistic Regression)
  4. Disgression -> Perceptron

Random! Shuffle v.s. Permutation (Numpy)

date_range Jan. 31, 2019 - Thursday

Generally, in Numpy, both random.permutation and random.shuffle randomly shuffle elements in an array. But there are differences:

How to Force Keras to use CPU to Run Script?

date_range Jan. 23, 2019 - Wednesday

The reason for such a demand:

My main training program was using the GPU fully. But I needed to get a prediction with another previously trained model urgently. I tried to use the GPU but I got OOM. Therefore, using CPU for the predicting job should be a good solution, and it did solve the problem!

Generally there are two ways: a short/lazy one and a lengthy but graceful one.

Option I:

If you want to force Keras to use CPU

import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" 
os.environ["CUDA_VISIBLE_DEVICES"] = ""

before Keras / Tensorflow is imported.

How to Support LaTex in Jekyll?

date_range Jan. 22, 2019 - Tuesday

To render math symbols and formula using LaTex in Jekyll website, check the links below,

Also Remember to update the cdnjs link, which is described in the last reference link.

Reference

What does 'rc' Mean in Unix-like systems, or even in Matplotlib rcParams?

date_range Jan. 17, 2019 - Thursday

In the context of Unix-like systems, the term rc stands for the phrase “run commands”. It is used for any file that contains startup information for a command. It is believed to have originated somewhere in 1965 from a runcom facility from the MIT Compatible Time-Sharing System (CTSS).

From Brian Kernighan and Dennis Ritchie:

There was a facility that would execute a bunch of commands stored in a file; it was called runcom for “run commands”, and the file began to be called “a runcom”. rc in Unix is a fossil from that usage.