วันจันทร์ที่ 30 กันยายน พ.ศ. 2567

วันอาทิตย์ที่ 29 กันยายน พ.ศ. 2567

Customgpt VS Chatgpt

 CustomGPT utilizes ChatGPT for transfer learning in two primary ways:

  1. Foundation Model: ChatGPT serves as the foundation for CustomGPT models. This means that the underlying architecture and knowledge base of ChatGPT are used as a starting point for training CustomGPT models.
  2. Fine-Tuning: CustomGPT models are further trained on specific datasets relevant to their intended use cases. This process, known as fine-tuning, allows the models to learn and adapt to the unique characteristics of the target domain.

By combining ChatGPT's general-purpose capabilities with fine-tuning on specific datasets, CustomGPT can create highly specialized AI models that are tailored to perform well in various applications.

วันศุกร์ที่ 27 กันยายน พ.ศ. 2567

Neural Net's Learning rate adjustment

 One cycle policy (OCP)  is increasing and decreasing learning rate (i.e. adaptive learning rate) between upper & lower bounds to avoid slow training as much as possible.

https://medium.com/@varunsivamani/one-cycle-policy-a-deep-understanding-6d4d352ec7b1

https://medium.com/dsnet/the-1-cycle-policy-an-experiment-that-vanished-the-struggle-in-training-neural-nets-184417de23b9

วันพฤหัสบดีที่ 26 กันยายน พ.ศ. 2567

SLA Tiers

Level 1 – 7/24/4 

  • 7 days a week, 24 hours a day, reaction within 4 hours 
  • 7×24 Help Desk 
  • 7×24 Monitoring 
  • Initial Phone-Based Diagnosis 
  • Field Engineer on-site (if required) within 4 hours after customer contact 
  • On-Site Spares Kit 
  • Parts Replacement 
  • Certified Experts 

Level 2 – 5/9/4 

  • 8 hours a day, 5 working days per week, reaction within 4 hours 
  • 8am-5pm Help Desk 
  • 8am-5pm Monitoring 
  • Initial Phone-Based Diagnosis 
  • Field Engineer on-site (if required) within 4 hours after customer contact 
  • On-Site Spares Kit 
  • Parts Replacement 
  • Certified Experts 

Level 3 – Next Day 

  • Next business day response/parts 
  • Initial Phone-Based Diagnosis  
  • Field Engineer on-site (if required) the following business day after customer contact 
  • On-Site Spares Kit 
  • Parts Replacement 
  • Certified Experts 

https://www.parkplacetechnologies.com/blog/what-does-24x7x4-support-mean-for-your-business/

วันจันทร์ที่ 23 กันยายน พ.ศ. 2567

Predicting Continuous Values with Transformers

Gemini:

Transformers can be effectively used to predict continuous values. While they were initially designed for natural language processing (NLP) tasks, their ability to capture long-range dependencies and complex patterns has made them versatile for various machine learning applications, including regression problems.

How Transformers Work for Regression

 * Input Encoding: The continuous values are typically encoded into a sequence of numerical representations, often using techniques like:

   * Embedding: For categorical variables

   * Normalization: For numerical variables

 * Positional Encoding: To provide the model with information about the relative position of each element in the sequence, positional encoding is added.

 * Transformer Layers: The input sequence is processed through multiple transformer layers, each consisting of:

   * Self-Attention: Captures relationships between different elements in the sequence.

   * Feed-forward Network: Applies a non-linear transformation to each element.

 * Output Layer: The final layer is a linear layer that maps the output of the transformer layers to a continuous value.

Advantages of Using Transformers for Regression

 * Long-range dependencies: Transformers can capture long-range dependencies, making them suitable for time series forecasting or tasks involving complex relationships between distant elements.

 * Flexibility: They can handle both sequential and non-sequential data, providing flexibility in various applications.

 * State-of-the-art performance: Transformers have achieved state-of-the-art results in many regression tasks, including time series forecasting and medical image analysis.

Key Considerations

 * Data preprocessing: Proper data preprocessing, including normalization and handling missing values, is crucial for optimal performance.

 * Hyperparameter tuning: Experimenting with different hyperparameters, such as the number of layers, attention heads, and hidden dimensions, can help improve results.

 * Computational resources: Training large transformer models can be computationally expensive, requiring significant GPU resources.

In conclusion, Transformers are a powerful tool for predicting continuous values, especially in tasks involving complex relationships and long-range dependencies. By understanding their architecture and key considerations, you can effectively leverage them for your regression problems.

Claude:

Transformers can be used to predict continuous values. This is often referred to as "regression" in machine learning terminology. Here's a brief overview:

1. Output layer modification: Instead of using a softmax layer for classification, you'd use a linear layer to output a single continuous value.

2. Loss function: You'd typically use mean squared error (MSE) or mean absolute error (MAE) as the loss function, rather than cross-entropy used in classification tasks.

3. Architecture: The core Transformer architecture (self-attention, feed-forward layers, etc.) remains largely the same.

4. Applications: This approach has been used successfully in various domains, including:

   - Time series forecasting

   - Financial predictions

   - Scientific modeling (e.g., predicting physical properties)

5. Variants: Some models like Temporal Fusion Transformers (TFT) are specifically designed for time series regression tasks.

Example:

https://medium.com/@Matthew_Frank/stock-price-prediction-using-transformers-2d84341ff213#:~:text=A%20Global%20Average%20Pooling%20layer,values%2C%20such%20as%20stock%20prices.

Benchmark & Baseline

Benchmarking involves measuring and comparing the performance of systems, models, or processes against a standard or across different systems. This process helps to evaluate how well a model or system performs in relation to known standards or to other models. In machine learning, the benchmark is usually set by the performance of the baseline or other leading models.

Benchmarking uses baselines: The baseline serves as the initial point of comparison in benchmarking. When evaluating a model or system, the baseline provides the first performance standard. If a model performs better than the baseline, it’s an indicator that the model has some value, and further benchmarking against other models can help assess its true effectiveness.

Baseline establishes expectations: Without a baseline, benchmarking would lack a clear starting point. By defining what "acceptable" or "expected" performance looks like, the baseline enables meaningful benchmarking comparisons.

Normalized RMSE & Normalized MAE

To compare model performance across different datasets by scaling the error metrics, you can normalize both RMSE and MAE:

Normalized RMSE:

  • using the mean of data setNRMSE=RMSEy¯ (i.e., Coefficient of Variation of RMSE)

  • using the difference between maximum and minimum in data setNRMSE=RMSEymaxymin,

  • using the standard deviation of data setNRMSE=RMSEσ, or

  • using the interquartile range of data setNRMSE=RMSEQ1Q3, i.e. the difference between 25th and 75th percentile, of observations.


https://www.marinedatascience.co/blog/2019/01/07/normalizing-the-rmse/

Normalized MAE: 
  • aka. Coefficient of Variation of MAE; Coefficient of Variation (CV) =  the ratio of the standard deviation  to the mean 
  • using the mean of data setNRMSE=RMSEy¯ 

วันเสาร์ที่ 21 กันยายน พ.ศ. 2567

วันพุธที่ 18 กันยายน พ.ศ. 2567

Load balancing db servers

The master-slave (or primary-replica) database architecture is a common approach for handling database load and ensuring data redundancy. In this setup:

1. Master (Primary): The master server handles all write operations (insert, update, delete). It's the authoritative source of data.

2. Slave (Replica): Slave servers are read-only copies of the master. They replicate data from the master server, often in near real-time, and are typically used for read operations (queries).

While this setup does provide some level of load balancing (by offloading read queries to slave servers), it doesn’t fully balance the load for write operations, as all writes go through the master. This can become a bottleneck in write-heavy environments.

For true write-load balancing or higher scalability, other architectures like multi-master replication or distributed databases (e.g., Cassandra, CockroachDB) might be used, where multiple servers can handle both reads and writes. However, the master-slave approach remains widely used due to its simplicity and reliability, especially for applications with more read-heavy workloads.

วันอาทิตย์ที่ 15 กันยายน พ.ศ. 2567

Sandbox

 A sandbox is an isolated environment where code or software can be executed, experimented with, or tested without affecting the host system or other environments. It’s commonly used for security, testing, and development purposes. Here are some key uses of sandboxes:

  1. Software Testing: Developers use sandboxes to run untested or untrusted code without risking damage to the main system.
  2. Cybersecurity: Sandboxing is employed to analyze potentially malicious files or programs, preventing any harmful effects from spreading to the actual system.
  3. Application Development: Sandboxes allow developers to test features, integrations, and changes without disrupting live systems or services.
  4. Browser Isolation: Modern web browsers use sandboxing techniques to prevent malicious websites from affecting the rest of the system.
  5. Virtual Machines (VMs) and Containers: These are examples of sandboxing where operating systems or applications are isolated in a controlled environment. 

วันเสาร์ที่ 14 กันยายน พ.ศ. 2567

Cryptocurrency is hacker's tool

Hackers often use cryptocurrency for ransomware attacks because it offers several advantages that make it appealing for criminal activities:

1. Anonymity and Pseudonymity: Cryptocurrencies like Bitcoin are pseudonymous, meaning that while all transactions are recorded on a public ledger (the blockchain), the identities of those involved are not directly tied to the transactions. This makes it harder for authorities to trace the hacker.

2. Decentralization: Cryptocurrencies operate on decentralized networks, meaning no central authority can freeze or reverse transactions. This ensures that once the ransom is paid, the hackers can safely receive the funds without fear of interference from banks or government agencies.

3. Global Accessibility: Cryptocurrencies are accessible globally, allowing hackers to receive payments from victims in different countries without worrying about international financial regulations or currency conversion issues.

4. Irreversible Transactions: Once a cryptocurrency transaction is confirmed on the blockchain, it cannot be reversed. This guarantees that hackers will retain the ransom payment without fear of chargebacks or disputes, which can happen with traditional payment methods.

5. Easy to Launder: Hackers can use various methods like mixing services or "tumblers" to obfuscate the trail of cryptocurrency transactions, making it even more difficult for law enforcement to track the movement of the funds.

These factors combined make cryptocurrency an attractive and relatively secure option for cybercriminals to extort victims without easily getting caught.

A cryptocurrency tumbler (or mixing service) is a tool used to enhance the privacy and anonymity of cryptocurrency transactions. It works by mixing potentially identifiable cryptocurrency funds (e.g., Bitcoin) with others, obscuring the trail of the original source of the funds. This process makes it much harder for anyone, including law enforcement, to trace the funds back to their original owner.


Here’s how a tumbler typically works:


1. Receiving Funds: The user sends cryptocurrency to the tumbler service.



2. Mixing Process: The service combines the user’s funds with other users' funds or its own reserves. It often splits the funds into smaller amounts and processes them through multiple random transactions.



3. Redistribution: After the mixing process, the user receives the same amount of cryptocurrency back, but from different sources and often in different amounts spread over time, making it difficult to associate the outgoing funds with the original deposit.

Why Hackers Use Tumblers:

Hackers use tumblers to further obfuscate the path of stolen or extorted cryptocurrency (such as ransom payments). By "mixing" their transactions with others, they can effectively break the connection between the ransom and their wallet, making it significantly harder for investigators to track them.

However, tumbling services are controversial and often scrutinized by governments because they can be used for money laundering and other illegal activities. Many jurisdictions have begun to regulate or ban them entirely due to their association with criminal use.


ผู้นิพนธ์

ผู้ประพันธ์อันดับแรก (first author) หมายถึง ผู้ที่มีชื่อในผลงานวิชาการเป็นชื่อแรก รับผิดชอบการทำผลงานทางวิชาการ และเขียนต้นฉบับ (manuscript) ชิ้นนั้นด้วยตนเอง ซึ่งการกำหนดบทบาทหน้าที่ความรับผิดชอบของผู้ขอตำแหน่งต่อผลงานทางวิชาการ ๑ เรื่อง หากผู้ขอมีบทบาทหน้าที่เป็น co-first author สามารถนำผลงานมาเสนอขอตำแหน่งทางวิชาการได้เช่นเดียวกับผู้ขอที่มีบทบาทหน้าที่เป็น first author ซึ่งต้องระบุไว้ในบทความที่เผยแพร่ในวารสาร และต้องไม่อยู่ในสังกัดเดียวกัน

ผู้ประพันธ์บรรณกิจ (corresponding author) หมายถึง บุคคลที่มีบทบาทและความรับผิดชอบในการเผยแพร่ผลงานวิจัย หรือผลงานทางวิชาการ ให้เกิดการถ่ายทอดเป็นเรื่องราวแสดงให้เห็นถึงคุณค่าทางวิชาการที่ประกอบด้วย การแสดงข้อมูล หลักฐาน ข้อคิดเห็น และประสบการณ์ รวมทั้งทำหน้าที่รับผิดชอบติดต่อกับบรรณาธิการ สำหรับงานที่เป็น นานาชาติ หรือ multi-disciplinary ที่มีศาสตร์มากกว่า ๑ ศาสตร์ มี corresponding author ได้ไม่เกินสองคน ทั้งนี้ ต้องระบุในบทความที่เผยแพร่ในวารสาร และนำมาขอตำแหน่งได้เช่นเดียวกับ corresponding author แต่ผู้ขอต้องไม่อยู่ในสังกัดเดียวกัน

  ผู้มีส่วนสำคัญทางปัญญา (essentially intellectual contributor; coauthor) หมายถึง บุคคลที่มีบทบาทมีส่วนสำคัญทางปัญญา (essentially intellectual contributor) ด้วยความเชี่ยวชาญในสาขาวิชาของตนเอง และความรับผิดชอบสำคัญในการออกแบบการวิจัย (research design) หรือการออกแบบงานวิชาการนั้น ๆ รวมทั้งวิเคราะห์ข้อมูล (data analysis) สรุปผลและให้ข้อเสนอแนะ



วันศุกร์ที่ 13 กันยายน พ.ศ. 2567

เอกภาพ สารัตถภาพ และสัมพันธภาพ

เอกภาพ (unity) คือ ความเป็นอันหนึ่งอันเดียวกัน หมายความว่าไม่ให้เขียนนอกชื่อเรื่องของานนิพนธ์เด็ดขาด สัมพันธภาพ (coherence) คือ ความสัมพันธ์กัน หมายถึง ข้อความแต่ละข้อความหรือแต่ละย่อหน้าจะต้องมีความสัมพันธ์เกี่ยวเนื่องกันมีความเป็นเหตุเป็นผลกัน สารัตถภาพ (main idea) คือ การเน้นสาระสำคัญของย่อหน้าแต่ละย่อหน้า และของเรื่องทั้งหมด โดยใช้ประโยคสั้น ๆ สรุปกินความทั้งหมด 

ARIMA





















ARIMA can be applied to both one-step-ahead and multi-step-ahead forecasting.

  • One-step-ahead prediction means that ARIMA predicts the next immediate value in a time series based on past data.
  • Multi-step-ahead prediction refers to forecasting several steps into the future, though this tends to accumulate more error as predictions are iteratively based on previously forecasted values.
Tuning ARIMA model




































  • ARIMA (AutoRegressive Integrated Moving Average) models are inherently linear and for linear time series forecasting. They operate by combining past observations (autoregressive component), differencing to achieve stationarity (integrated component), and past errors (moving average component) to predict future values.
  • The "autoregressive" (AR) part of ARIMA indicates that the evolving variable of interest is regressed (พัฒนาขึ้นมาจากขั้นก่อนหน้า) on its prior values. The "moving average" (MA) part indicates that the regression error is a linear combination of error terms whose values occurred contemporaneously and at various times in the past. The "integrated" (I) part indicates that the data values have been replaced with the difference between each value and the previous value.

วันพุธที่ 11 กันยายน พ.ศ. 2567

การออกข้อสอบ multiple choices

 ขอสอบที่ป้องกันการเดาต้องมีตัวเลือกลวงให้ตอบอันเนื่องจาก misconception ของผู้เรียน


วันอังคารที่ 10 กันยายน พ.ศ. 2567

Retrieval Augmented Generation (RAG)

For more complex and knowledge-intensive tasks, it's possible to build a language model-based system that accesses external knowledge sources to complete tasks. This enables more factual consistency, improves reliability of the generated responses, and helps to mitigate the problem of "hallucination".

Meta AI researchers introduced a method called Retrieval Augmented Generation (RAG) to address such knowledge-intensive tasks. RAG combines an information retrieval component with a text generator model. RAG can be fine-tuned and its internal knowledge can be modified in an efficient manner and without needing retraining of the entire model.

https://www.promptingguide.ai/techniques/rag



Human collaborate with AI at each level in Bloom

 https://ecampus.oregonstate.edu/faculty/artificial-intelligence-tools/meaningful-learning/?fbclid=IwY2xjawFNA75leHRuA2FlbQIxMQABHc8Rn9HGNFPS4ox-0w9V_3sBCFSiPDfNC2ZjBqI3Ct5DkokewAb7Mu3g6w_aem_ZxeWijoj76ZsSuT6agsgAA

วันอาทิตย์ที่ 8 กันยายน พ.ศ. 2567

Gartner hype cycle 2024

https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.gartner.com%2Fen%2Fnewsroom%2Fpress-releases%2F2024-08-21-gartner-2024-hype-cycle-for-emerging-technologies-highlights-developer-productivity-total-experience-ai-and-security%3Ffbclid%3DIwZXh0bgNhZW0CMTAAAR31yitIG_MJ2vj6MPiqu7aYQjxPqcM8wfHZrSyQrKUZHChA2QKT26yST0Y_aem_kP2chMfAEzOdBfk_xcjKeA&h=AT30unTfrm-9OeCD8vRBwwBhQwa5ptWT9nu3G5y9VaCp6jpSvWWX2WqapsNfwLxv1iCaLfsAiirPb70ePrJz5wUHYkAW_GWphdjRy5BdtWdjXpHAZ4n22RenB5pn4C83sCCE&__tn__=-UK-R&c[0]=AT0I_MYN3K0HqoXw1UqvBmmpMmCffHPBnjpDTer8Y08bjm7vcanp6GC9msZG9kkpHnMuwmpIg2ZnvNRII89kgbwoZILAojulacjaYkP6V68UQ20x-psAyyEajCzL81f-WtqJFZ66C0rMM7VnYeZd5cdg6exKF9qY94Z1zaweH2YO9adsK09IdyLhlZ4b0iNpCX7vStPAnHuyCliosVLZj2VxqqWFOyxkvyXNhQ

Superapp is a portal for accessing multiple miniapps. https://www.gartner.com/en/articles/what-is-a-superapp?fbclid=IwY2xjawFKCd1leHRuA2FlbQIxMAABHZtHY4NTZYYtbkYltU2TrPpM5GiR2ZHRb4a8g2tKOYc38CJUpUoQBT2x1g_aem_h2-7vLBlCyMrQ_vbVdTT2A

Cloud native is anything exhibiting cloud essential characteristics. https://www.gartner.com/en/information-technology/glossary/cloud-native?fbclid=IwY2xjawFKCgZleHRuA2FlbQIxMAABHQy7GC7gOkYBpUD1YF5Z3M8utxCJqsGi_TtvJyCAtiudN1064VPUZ8h-Sw_aem_wWkWdxPuvy6njfwCRlWd_w#:~:text=Cloud%2Dnative%20refers%20to%20something,capabilities%20delivered%20as%20a%20service

Machine customer is  AI-driven programs designed to buy and sell products automatically e.g. Printers that order ink.  https://www.gartner.com/en/newsroom/press-releases/03-16-2023-gartner-says-machine-customers-represent-one-of-the-biggest-new-growth-opportunities-of-the-decade

Internal Developer Portal is a unified all-in-one application designed exclusively for an organization’s development team. This portal serves as a one-stop platform, offering various tools and resources necessary for software development. It’s tailored to suit the specific needs and workflows of the company’s developers, ensuring they have quick and easy access to everything they need. The portal typically includes access to APIs, code repositories, documentation, and support resources, streamlining the development process. https://medium.com/@rphilogene/what-is-an-internal-developer-portal-6bcbe2481300

วันพุธที่ 4 กันยายน พ.ศ. 2567

GAI for architect

 https://www.reddit.com/r/StableDiffusion/comments/13m42rr/architectural_design_using_stable_diffusion_and/?rdt=33255

Control net:

https://github.com/lllyasviel/ControlNet

Diffusion model:

https://www.superannotate.com/blog/diffusion-models


วันอาทิตย์ที่ 1 กันยายน พ.ศ. 2567

CRUD

 CRUD <=> SQL

-----------------------------

Create <=> INSERT

Read <=> SELECT

Update <=> UPDATE

Delete <=> DELETE