วันอังคารที่ 21 กุมภาพันธ์ พ.ศ. 2560

วาจา

Text to speech software application and API developed by NECTEC.

DeepDive

DeepDive is a system to extract value from dark data ( Gartner defines dark data as the information assets organizations collect, process and store during regular business activities, but generally fail to use for other purposes (for example, analytics, business relationships and direct monetizing). Similar to dark matter in physics, dark data often comprises most organizations’ universe of information assets. Thus, organizations often retain dark data for compliance purposes only. )  and put the results into a database. With the data in a database, one can use a variety of standard tools that consume structured data; e.g., visualization tools like Tablaeu or analytics tools like Excel.

--http://deepdive.stanford.edu

Convolutional neural network

CNN is type of feed-forward artificial neural network in which the connectivity pattern between its neurons is inspired by the organization of the animal visual cortex.

--wiki

วันเสาร์ที่ 11 กุมภาพันธ์ พ.ศ. 2560

การนั่งสมาธิและการใคร่ครวญธรรม

ถ้าจิตหดหู่ให้ใคร่ครวญธรรมอย่านั่งสมาธิ
ถ้าจิตฟุ้งซ่านให้นั่งสมาธิอย่าใคร่ครวญธรรม

วันพุธที่ 8 กุมภาพันธ์ พ.ศ. 2560

อกุศลกรรมบท 10, 20, 30, 40

อกุศลกรรมบท 10 คือทำอกุศลเอง
อกุศลกรรมบท 20 คือทำอกุศลเอง และชักชวนผู้อื่นทำ
อกุศลกรรมบท 30 คือทำอกุศลเอง และชักชวนผู้อื่นทำ และยินดีกับการกระทำอกุศลของเข้า
อกุศลกรรมบท 40 คือทำอกุศลเอง และชักชวนผู้อื่นทำ และยินดีกับการกระทำอกุศลของเข้า และสรรเสริญผู้ทำอกุศล

Openlayer

https://openlayers.org/

OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds. It is completely free, Open Source JavaScript.

วันศุกร์ที่ 3 กุมภาพันธ์ พ.ศ. 2560

Machine learning approaches


Well known ML algorithm teaching videos

statistical prediction techniques เช่น linear/logistic regression, MACD, ARIMA ผู้ใช้ต้องทราบลักษณะบางประการของโมเดลเพื่อเลือกประเภทของเทคนิคให้ถูกจึงสร้างโมเดลได้ เช่น ทราบว่าเป็น linear จึงใช้ linear regression ส่วน ML ไม่จำเป็นต้องทราบ

Zero rule and One rule http://www.saedsayad.com/classification.htm

Support Vector Machine (SVM) classificationเป็นการหาเส้นตรง (hyperplane) เพื่อลากแบ่งข้อมูลเป็นสองคลาส (binary sets) จากนั้นพอมีข้อมูลชิ้นใหม่เข้ามาให้ classify ก็นำไปแทนในสมการ hyperplane ถ้าเป็นบวกก็จัดอยู่ในคลาสนึง ถ้าลบก็อีกคลาสนึง
https://youtu.be/1NxnPkZM9bc

k nearest neighbor (kNN) classification นำ training vectors ไปสอนอัลกอเพื่อให้อัลกอบันทึกไว้ทั้งหมด สมมติว่าแต่ละ vector ประกอบด้วย2features คือส่วนสูง(แกน x) และ นน(แกนy) และ vectors ทั้งหมดนี้แบ่งออกเป็น 2 คลาสคือเพศชายและเพศหญิง เมื่อมี vector ใหม่ (ข้อมูลของคนใหม่) มาให้จำแนกว่าเป็น ช หรือ ญ อัลกอก็ทำการคำนวณ distance ด้วยสูตรต่างๆ ซึ่งมีให้เลือกหลายสูตร เพื่อหา k vectors ที่อยู่ใกล้ new vector มากที่สุด แล้วนับดูว่า vectors เหล่านั้นจัดอยู่ในคลาส ช หรือ ญ มากกว่ากัน ถ้า ช ก็จะสรุปว่า new vector เป็น ช ด้วย ดังนั้น k ต้องเป็นเลขคี่ การประยุกต์ใช้งานอื่นๆ เช่นถ้า k = 1 จะเป็นการหา similarity ว่า ตย ที่ให้มาควรจัดอยู่ในคลาสใด ซึ่งคลาสที่กำหนดให้อาจมีมากกว่าสองคลาสได้ (ดูคลิปที่สอง)

k mean clustering มีชุดข้อมูลอยู่ ต้องการแบ่งออกเป็น k กลุ่ม (เช่นจัดกลุ่มผลไม้ที่สีคล้ายๆกัน) โดยในแต่ละกลุ่มประกอบด้วยสมาชิกคล้ายๆกัน อัลกอมีลักษณะ iterative ที่จะทำให้ผลลัพธ์ convergence มากขึ้นเรื่อยๆ
การหาค่า k ที่เหมาะสมถ้าไม่ทราบล่วงหน้า คือใช้สูตร elbow หรือ silhouette หรือ gap statistic (https://medium.com/analytics-vidhya/how-to-determine-the-optimal-k-for-k-means-708505d204eb)

Agglomerative clustering relies on dendogram
https://www.youtube.com/watch?v=XJ3194AmH40

Vector space model ใช้หา similarity ระหว่าง 2 (feature) vectors
https://youtu.be/ZEkO8QSlynY
Linear regression ใช้ predict continuous value โดยใช้ 1 หรือหลาย input variables ก็ได้ (ถ้า input variable เป็น vector จะเรียกว่า multiple linear regression) ดูคลิปนี้ประมาณที่นาทีที่ 2.06 จะเห็นว่าเป็นการพยากรณ์ค่า y จากค่า x โดยที่ค่า y ที่พยากรณ์ได้จะอยู่บนเส้นตรง (linear) นั่นเอง และจากคลิปจะเห็น error (delta Y) ที่เกิดจากค่า y จริงของจุด output จริง กับค่าที่พยากรณ์ได้บนเส้นตรง
https://www.youtube.com/watch?v=zPG4NjIkCjc
Simple linear regression เหมือน linear regression ยกเว้นใช้แค่ 1 input variable 

Logistic regression (นั่นคือ single layer perceptron ที่ใช้ sigmoid function) ซึ่งใช้ทำ binary classification แต่สามารถประยุกต์ทำ multiclass classification คือจำแนกออกเป็นมากกว่าสองคลาสได้ตามคลิปนี้

Multiclass SVM ใช้ทำ multiclass classification

Classification metrics: precision, recall, F measure,
accuracy & loss (eg. cross entropy) (https://kharshit.github.io/blog/2018/12/07/loss-vs-accuracy) (cross entropy : https://ml-cheatsheet.readthedocs.io/en/latest/loss_functions.html)

SOM (self organizing map) for dimentionality reduction (e.g. from 20 human-understandable attributes to 2 machine-understandable attributes).
https://m.youtube.com/watch?v=H9H6s-x-0YE
https://m.youtube.com/watch?v=9ZhwKv_bUx8
http://www.cs.bham.ac.uk/~jxb/NN/l16.pdf
https://docs.rapidminer.com/latest/studio/operators/cleansing/dimensionality_reduction/self_organizing_map.html
Another technique for dimension reduction is Principal Component Analysis (PCA): a statistical algorithm used to transform a set of possibly correlated variables into a set of uncorrelated linear re-combinations of those variables called principal components.
Yet another technique that can be applied to dimension reduction is singular value decomposition (SVD) (https://en.wikipedia.org/wiki/Singular_value_decomposition). High dimension data can suffer curse of dimensionality (https://en.wikipedia.org/wiki/Curse_of_dimensionality): occurs when your data has too many features i.e. when the dimensionality increases, the volume of the space increases so fast that the available data become sparse. This sparsity is problematic for any method that requires statistical significance. In order to obtain a statistically sound and reliable result, the amount of data needed to support the result often grows exponentially with the dimensionality.

Unsupervised neural net is used to extract structures of input e.g. to find vectors representing words as word2vec and to remove noise from photo using cost function adding noise to output and comparing it with input.
https://youtu.be/P8_W5Wc4zeg at the 3rd minute.
To recap, it is used for dimensionlity reduction by using 2 connected mlps (the connected layer must be bottleneck to represent the dimension reduction).
https://medium.com/intuitive-deep-learning/autoencoders-neural-networks-for-unsupervised-learning-83af5f092f0b













































Word2vec chooses window size (a number of contiguous words) then convert each word in a window by using Onehot function, then creating a list of nearby word (encoded with onehot) pairs i.e. training set of backprop MLP using linear activation function.  After training, word2vec value is the multiplication of weight vector and onehot input vector. See https://youtu.be/64qSgA66P-8 and https://youtu.be/UqRCEmrv1gQ


EM Algorithm (Expectation-maximization) is a way to find maximum-likelihood estimates for model parameters when your data is incomplete, has missing data points, or has unobserved (hidden) latent variables. (https://www.statisticshowto.datasciencecentral.com/em-algorithm-expectation-maximization/) ใช้ทำ oversampling เพื่อแก้ปัญหา imbalanced data ได้ (https://arxiv.org/abs/1811.07674)

In the context of machine learning, a hyperparameter is a parameter whose value is set before the learning process begins. Unlike model parameters, which are learned from the training data, hyperparameters are external to the model and must be specified by the practitioner. Hyperparameters are parameters that control the behavior of machine learning algorithms.


ML VS. Statistics




วันพฤหัสบดีที่ 2 กุมภาพันธ์ พ.ศ. 2560