Machine Learning Fundamentals: Algorithms and PyTorch Implementation

Machine Learning Core Concepts

Basic Mathematical Information

Matrix Multiplication

  • If Matrix A has size (m x n) and Matrix B has size (n x p), the resulting product AB has size (m x p).
  • The number of columns in A must equal the number of rows in B.
  • Calculation involves multiplying each row of A by each column of B.

Finding Log Base 2 (n)

AD_4nXfUiHots-XMWpr9xYeeVyJl2Bsz_zyCmDxGn4of4bp44I5m3IinDe4myLlS8s4E88V-N8NCEe9LAAM7OBeLnzfw36KoraNOeFysxq8nmm_uZmRjWSt34OdJI9TrFfBXkMR4gGMG?key=M4vzI9Gg7pcCKGgSZtX7d-xa

Key Machine Learning Definitions

  • Supervised Learning: Models learn from labeled data to approximate a target function (hypothesis function).
  • Classification: Goal is to
Read More

Machine Learning & AI Foundations: Definitions, Lifecycle, and Tools

CRISP-ML(Q) Project Lifecycle

  • Definition: A 6-phase framework for managing machine learning projects, with a focus on quality at each step.
  • Phases and Examples:
    1. Business & Data Understanding

      • Definition: Define the business problem and assess available data.
      • Example: Goal: Reduce customer churn by 15%. Data: Purchase history, support tickets.
    2. Data Preparation

      • Definition: Clean, organize, and transform raw data for modeling.
      • Example: Create “age” from “date of birth”; unify country codes like “USA” and
Read More

8085 Microprocessor Architecture & Assembly Language Fundamentals

Bus Organization in 8085 Microprocessors

A bus in the 8085 microprocessor is a group of wires used for communication between different components. There are three main types:

  • Data Bus: Carries actual data, like a delivery van.
  • Address Bus: Carries the memory address to access data, like a GPS.
  • Control Bus: Carries control signals (e.g., read/write instructions). These signals coordinate data movement between the CPU, memory, and I/O devices.

Memory Addressing & Mapping Fundamentals

Memory addressing

Read More

NLP Foundations: From Text Processing to Large Language Models

Week 1: Working with Words

  • Tokenization:


    Splitting text into discrete units (tokens), typically words or punctuation . Techniques vary (simple split on whitespace vs. Advanced tokenizers); challenges include handling punctuation, contractions, multi-
    word names, and different languages (e.G., Chinese has no spaces). Good tokenization is foundational for all NLP tasks.
  • Bag-of-Words (BoW):


    Representing a document by the counts of each word in a predefined vocabulary, ignoring order . The vocabulary is
Read More

Cybersecurity Essentials: Concepts & Best Practices

Vulnerability & Patch Management

(Domain 4 Concepts)

Common Vulnerability Scoring System (CVSS)

  • Rates vulnerabilities on a scale of 0-10 for severity.

Exploit vs. Zero-Day

  • Exploit: A known attack method against a vulnerability.
  • Zero-Day: A vulnerability that has no patch available yet.

Remediation vs. Mitigation

  • Remediation: Completely fixing a vulnerability.
  • Mitigation: Applying temporary protections while awaiting a full fix.

Common Scanning Tools

  • Nessus / OpenVAS: Identify known vulnerabilities.
  • Nikto:
Read More

Quantitative Methods & Machine Learning Essentials

Likelihood Function

The likelihood function describes how observed data depends on the model parameters, θ. It is often denoted as p(x|θ).

Maximum Likelihood Estimation (MLE)

The Maximum Likelihood Estimator (MLE), δ(x), is defined as:

AD_4nXens3ikERhLz2M8HRO4dfpKx9_w9BgUbx73ALHG41CGRjsBxhIsjOw4BzE1BphWCTk53xzdyxIzHr1I422n2rEii-8h4nn-e_ANVu9Lfvd-9gTgwuMjXiTVHu3h94h_Pp-zzdZm?key=LHRE6LkDAk3aauFWnXAY3w

or equivalently:

AD_4nXcBOqTKdnd_44nT9SvCEN_DC3fTsTRA6L92Ma8KuAwJFiqJw1ob3yLLhFBxcIFmvg5br9WC97OQbtxEoadi3MJZmlNWDP--HzQmzGYYOHlE92JvAyaLrwZrPv1hOvQE0-1bhjRPHw?key=LHRE6LkDAk3aauFWnXAY3w

The Gaussian log-likelihood is shown above.

Asymptotic Distribution of MLE

When n is large, the asymptotic distribution of the MLE is given by:

AD_4nXcfhoYKSvG5j_M-BufAmuQPVt-n61jGX9AFGHH72am8FJwK1jJwpVhCbd18IozHsGDa5vglE6F4FYN9cMiEDAVGKnnwWcmgNHuaykwujgCqRVwcUUjRoQhM2WOLFu1X5v91vhpY8g?key=LHRE6LkDAk3aauFWnXAY3w

where:

AD_4nXfMjcWPVzPNV0KN67nEqo0BJIubRYV7FNxAznDQ2qrpYrVa_i36aynPjaomQ_CdQ1IZCCPIVU7aX2iaVZXGbVsUBaDXxn1wfyL61ohsq4xQrN0ndXHz4z62whJP9c9NWJ44fj8o?key=LHRE6LkDAk3aauFWnXAY3w

Examples include:

  • Gaussian: AD_4nXcrVSk61EBxOo-Yfcy7NovkHFiXR9vRQ1oDMDZJ3PDU1456xscUf4UlFihY50DKAC01kl1PrBCg8QvDmEYTZP7OGzMwky8IW5kWMc5-UBMyy14DWAuL8TqaPuoFOkeG2gWp4UrM?key=LHRE6LkDAk3aauFWnXAY3w
  • Exponential: AD_4nXdH3ZJbiU6DQ5fU66ztOanYvjMdHipMqQE66STpcJ_EYuBzRVH8grFgu9sedLQyeyMJmQZnD7hJ4i4SMSNcovoOpwfxK5RMHGPMLsJU-r_CtmogiS2jFbspG7UWBymWywXcp607?key=LHRE6LkDAk3aauFWnXAY3w

Bayesian Estimation

The Bayesian forecast is given by:

AD_4nXcQACF6aLi-R_oXFCxI00TGSzp-SYj3jT4-te79_CYDkkQzjHqVCY84UHTLI03s8qaHtVH0-f6QJk3J2FkjzwpsQlsphLkRnAtWxyBhAwwowcACKqZ2xphX_gASIN2w4wWDn5_MSw?key=LHRE6LkDAk3aauFWnXAY3w

Assume the

Read More