วันพฤหัสบดีที่ 25 พฤษภาคม พ.ศ. 2560

Structures of data


  • Structured content ใช้ predefined data model e.g. RDBs
  • Semi-structured structure content มี tag บอกความหมายภายใน เช่น XML tags แต่ไม่มี predefined data model รองรับ e.g. Word document, source code
  • Unstructured content ไม่มี predefined data model e.g. video, image

วันพฤหัสบดีที่ 18 พฤษภาคม พ.ศ. 2560

Machine learning frameworks


Google's Deepmind research group uses Tensorflow framework
Tensorflow is a python/c open-source machine learning framework

https://venturebeat.com/2016/04/29/deepmind-ai-group-moves-from-torch-framework-to-googles-own-tensorflow/

ML tutorial by Google
https://developers.google.com/machine-learning/crash-course/

AWS and Azure support MXNet
https://mxnet.apache.org/
Many other machine learning frameworks available:
https://en.wikipedia.org/wiki/Comparison_of_deep_learning_software

Spark MLlib is Apache Spark's scalable machine learning library i.e. machine learning for big data.
Spark is comparable and better than Hadoop Map Reduce.
Deep learning for Java
Just a portal

Apache Hadoop adopted a technique called mapreduce, which maps data queries across parallel processing resources and then reduces to useful results.

Keras (the Python Deep Learning library) is a high-level neural networks API, written in Python and capable of running on top of TensorFlowCNTK, or Theano. It was developed with a focus on enabling fast experimentation.

ImageAI is a State-of-the-art Recognition and Detection AI with few lines of code. http://imageai.org/

วันอังคารที่ 16 พฤษภาคม พ.ศ. 2560

ตัวอย่าง restful web service

บริการข้อมูลและสารสนเทศอุตุนิยมวิทยาและแผ่นดินไหว (TMDAPI)

http://data.tmd.go.th/api/index1.php

เป็น REST ที่ใช้ GET method ในการทำงาน เช่น GET...

แสดงข้อมูลข่าวประกาศเตือนภัยล่าสุด
http://data.tmd.go.th/api/WeatherWarningNews/v1/?uid=demo&ukey=demokey

แสดงข้อมูลข่าวประกาศล่าสดแบบ json
http://data.tmd.go.th/api/WeatherWarningNews/v1/?uid=demo&ukey=demokey&format=json

แสดงข้อมูลข่าวประกาศที่ออกประกาศในปี 2015 แบบ xml
http://data.tmd.go.th/api/WeatherWarningNews/v1/?uid=demo&ukey=demokey&format=xml&year=2015

วันจันทร์ที่ 8 พฤษภาคม พ.ศ. 2560

Convolution neural network (cnn)

An MLP with normally 3 hidden layers : convolution layer (similar to sliding window but here called filter producing output called feature map) & pooling layer (for non-linear down-sampling e.g. max pooling taking max value pixel) & fully connected layer.
Traditional MLP do not scale well to higher resolution images. For example, in CIFAR-10, images are only of size 32x32x3 (32 wide, 32 high, 3 color channels), so a single fully connected neuron in a first hidden layer of a regular neural network would have 32*32*3 = 3,072 weights. A 200x200 image, however, would lead to neurons that have 200*200*3 = 120,000 weights.
Also, such network architecture does not take into account the spatial structure of data, treating input pixels which are far apart the same as pixels that are close together. Thus, full connectivity of neurons is wasteful for the purpose of image recognition



zigbee

คาร์ล ริทเท่อร์ ฟอน ฟริช (Karl Ritter von Frisch) นักวิทยาศาสตร์ชาวออสเตรีย เจ้าของรางวัลโนเบลปี 1973 ได้ค้นพบคำตอบว่า คุณผึ้งแสนขยันตัวนั้น จะกลับมาระบำด้วยสเต็ปซิกแซก (zigzag) ให้มิตรสหายดู โดยการระบำนั้นจะสามารถบอกแก่ผึ้งตัวอื่น ๆ ว่า อาหารอยู่ในทิศทางใด และมีระยะที่ไกลไปจากรังเท่าไหร่ ซึ่งจากการสื่อสารที่แหวกแนวนี้เอง ทำให้พวกผองผึ้งสามารถระดมพลกันไปขนอาหารได้อย่างถูกต้องนั่นแหละคือคำต้องว่าทำไมถึงมี โปรโตคอลที่ชื่อ Zigbee

          เทคโนโลยี Zigbee จึงถูกสร้างขึ้นมาเพื่อการสื่อสารไร้สายที่ไร้ขีดจำกัดมากขึ้นกว่าเทคโนโลยีไร้สายแบบเดิม ๆ เช่น Bluetooth Wifi หรือ Z-Wave ในแง่ของขนาดเครือข่าย เทคโนโลยี Zigbee มีความยืดหยุ่นที่จะตอบสนองความต้องการของคุณได้มากที่สุด เพราะสามารถเชื่อมต่อได้ถึง 65,000 เซ็นเซอร์ ในขณะที่เทคโนโลยี Z-Wave เชื่อมต่อได้สูงสุดแค่ 230 เซ็นเซอร์ ในแง่ของความแรงของสัญญาญเทคโนโลยี Zigbee สามารถมี range ได้ถึง 300 เมตร ในขณะที่เทคโนโลยี Bluetooth สามารถไปไกลได้สูงสุดแค่ 10 เมตร และเทคโนโลยี Wifi สามารถไปไกลได้สูงสุดแค่ 100 เมตร นอกจากนั้น เทคโนโลยี Zigbee ยังประหยัดพลังงานสูงที่สุดในเทคโนโลยี ไร้สายทั้งหมด ด้วยอุปกรณ์บางชิ้นสามารถใช้ถ่านนาฬิกาเล็ก ๆ เพียงหนึ่งก้อน และมีอายุใช้งานไปได้เป็นปีเลยทีเดียว

www.smile-digital.com/blog/-what-is-zigbee/

วันพฤหัสบดีที่ 4 พฤษภาคม พ.ศ. 2560

บุคคลที่ควรบูชา

ภิกษุทั้งหลาย ! บุคคล ๘ จำพวกเหล่านี้ เป็นผู้ควรแก่ของบูชา ควรแก่ของต้อนรับ ควรแก่ของทำบุญ

ควรทำอัญชลี เป็นเนื้อนาบุญของโลก ไม่มีนาบุญอื่นยิ่งกว่า. ๘ จำพวกอะไรบ้างเล่า ?

๘ จำพวก คือ :-
(๑) พระโสดาบัน
(๒) พระผู้ปฏิบัติเพื่อทำให้แจ้งโสดาปัตติผล
(๓) พระสกทาคามี
(๔) พระผู้ปฏิบัติเพื่อทำให้แจ้งสกทาคามิผล
(๕) พระอนาคามี
(๖) พระผู้ปฏิบัติเพื่อทำให้แจ้งอนาคามิผล
(๗) พระอรหันต์
(๘) พระผู้ปฏิบัติเพื่อความเป็นอรหันต์

ภิกษุทั้งหลาย ! บุคคล ๘ จำพวกเหล่านี้แล เป็นผู้ควรแก่ของบูชา ควรแก่ของต้อนรับ ควรแก่ของทำบุญ
ควรทำอัญชลี เป็นเนื้อนาบุญของโลกไมมี่นาบุญอื่นยิ่งกว่า.

“ผู้ปฏิบัติแล้ว ๔ จำพวกและผู้ตั้งอยู่ในผลแล้ว ๔ จำพวกนี่แหละ ! สงฆ์ที่เป็นคนตรง,
เป็นผู้ตั้งมั่นแล้วในปัญญาและศีล ย่อมกระทำให้เกิดบุญอื่นเนื่องด้วยอุปธิ แก่มนุษย์ทั้งหลาย 
ผู้มีความต้องการด้วยบุญ กระทำการบูชาอยู่ ทานที่ให้แล้วในสงฆ์ จึงมีผลมาก”.

ปฐมธรรม หน้า ๑๕๒
(ไทย) อฏฐก. อํ. ๒๓/๒๓๐/๑๔๙. 
(บาลี) อฏฐก. อํ. ๒๓/๓๐๑/๑๔๙