Farrah's Notebook


  • Home

  • About

  • Tags

  • Categories

  • Archives

Numpy

Posted on 2019-08-02 | In Python

Using NumPy

After install NumPy, import it as a library:

import numpy as np

Creating NumPy Arrays

From a Python List

my_list = [1,2,3]
np.array(my_list)

my_matrix = [[1,2,3],[4,5,6],[7,8,9]]
np.array(my_matrix)
Read more »

Python for Data Science and Machine Learning Bootcamp

Posted on 2019-08-02 | In Python

Anaconda: a distribution of Python
Jupyter: a development environment (IDE) where we can write code, display images, and write markdown notes.

Open Jupyter Notebook

  1. Anaconda Navigator -> Jupyter Notebook
    By this way, we can only open Jupyter Notebook for data under C:\User\User\ (the layer of Anaconda3 is)

  2. Anaconda prompt -> change directory to where *.ipynb files are -> ‘$ Jupyter Notebook’

Read more »

Machine Learning Foundation HW1

Posted on 2019-08-02 | In Machine Learning

Q9: Consider a bin with infinitely many marbles, and let μ be the fraction of orange marbles in the bin, and ν is the fraction of orange marbles in a sample of 10 marbles. If μ=0.5, what is the probability of ν=μ? Please choose the closest number.

Explanation

u是罐子中的黄色小球概率,v是样本中的黄色小球概率,u=0.5。题目中已规定v=u=0.5,则10个样本中黄色球的个数为10*v=5,剩下的绿色球的个数为10-5=5。

最后实际上是要求解:取出来的10个样本中,黄色小球为5个 绿色小球为5个的概率。

注意,要用v来计算样本中各类小球的数量,这仅仅代表取样结果。真实取样时,要用罐子中的实际概u来求解。)

Ref:Class Forum

Read more »

Hexo - How to add pictures

Posted on 2019-08-02 | In Hexo

1. Modify post_asset_folder option of _config.yml to true

post_asset_folder: true
Read more »

Start to Use Hexo

Posted on 2019-08-01 | In Hexo

Installation

Preparation:

-Node.js (Should be at least nodejs 6.9)
-Git
-NVM (NVM for Windows)

Install Hexo:

After installed nvm, type the command below into cmdline:

$ npm install -g hexo-cli
Read more »
12

Farrah Tsai

15 posts
3 categories
21 tags
0%
© 2019 Farrah Tsai