Machine learning (ML) and Deep learning
Machines can learn using classical (mathematical) methods or neural networks inspired by biological processes. Machine learning enables computers to learn from data by finding patterns and making predictions without being explicitly programmed for every rule. There are two broad paradigms:
- Classical (statistical) machine learning: Relies on explicit features and interpretable models, often grounded in linear algebra, calculus, and probability theory.
- Neural network–based learning: Uses layered structures (neurons, or perceptrons) to automatically learn feature representations and complex mappings.
Classical ML models are typically data-efficient and easier to interpret but limited in handling raw, unstructured data such as images, audio, and text. Deep learning models learn hierarchical representations automatically but require more data, computation, and tuning.
Structured and unstructured data; Learning by Trial and Error
Machines can learn from structured or unstructured data and can improve autonomously using trial-and-error learning.
Data types
- Structured data: Tabular data with well-defined schema (rows, columns, types). Examples: spreadsheets, SQL tables.
- Unstructured data: Text, images, audio, videos, or sensor data - not easily represented as tables.
Learning types
- Supervised learning: Uses labeled data; the model learns to map inputs to outputs.
- Unsupervised learning: Finds patterns or structure in unlabeled data (e.g., clustering, dimensionality reduction).
- Reinforcement learning (RL): A trial-and-error process where an agent interacts with an environment, receives rewards, and learns policies that maximize cumulative reward.
Reinforcement learning connects closely with control theory and behavioral psychology. Key algorithms include Q-learning, Deep Q-Networks (DQN), policy gradients, and actor-critic methods.
Self-learning agents require exploration–exploitation balance (ε-greedy, entropy regularization) and stability mechanisms such as experience replay.
The machine learning process
The typical process of machine learning follows several steps:
1. Data collection – obtaining raw data from different sources.
2. Data cleaning – removing noise, handling missing values, and transforming data.
3. Data splitting – dividing data into training and testing sets.
4. Model training – creating and fitting a model using the training data.
5. Model testing – evaluating the trained model with testing data.
6. Model validation – if the model performs well, it becomes the final version; otherwise, it is retrained.
This cycle repeats until a satisfactory model is obtained.
A simple diagram of the process:
Data → Cleaning → Training/Test Split → Training Model → Testing Model → Validation → Final Model
Machine learning algorithms
Linear Regression
Models continuous outcomes using linear relationships.
Here it is a practical example
Logistic Regression
Models binary or multi-class outcomes via a sigmoid function mapping. Useful for predicting the probability of anything being true or false.
K-Nearest Neighbors (KNN)
K-Nearest Neighbors (KNN) is a supervised classification algorithm used to estimate the probability that an element *X* belongs to a class *C*, based on its proximity to other known examples in the dataset.

Decision Trees
Hierarchical models that split data based on feature thresholds. Easy to interpret but prone to overfitting.
Other algorithms & examples
Check in detail these algorithms and real implementations in python here
Deep learning: neural networks and perceptrons
Neural networks, inspired by the brain, use algorithmic nodes (perceptrons) arranged in layers to perform complex computations.
A perceptron is a simplified mathematical model of a neuron: it takes multiple inputs, applies weights and biases, passes the result through an activation function, and produces an output.
Neural networks are collections of perceptrons arranged in layers:
Multi-layered perceptrons and beyond
Multiple perceptron layers, arranged differently, expand machine learning into deep learning.
Deep learning refers to networks with multiple layers that progressively learn high-level features from raw input. DL architectures differ by input modality and task:
- Fully Connected Networks (MLPs): Basic building block for tabular or simple data.
- Convolutional Neural Networks (CNNs): Specialized for images.
- Recurrent Neural Networks (RNNs), LSTMs, GRUs: Handle sequences (text, audio, time series).
- Transformers: Use attention mechanisms; now dominate NLP, vision, and multimodal tasks.
Broad AI and everyday interactions
- Narrow AI (Weak AI): Designed for a specific task (e.g., spam detection, recommendation).
- Broad AI: Encompasses systems that can perform a range of related tasks and adapt to user context.
- Examples: digital assistants (Siri, Alexa, Google Assistant), recommender systems, chatbots, and adaptive user interfaces.
Generative AI: the new creative frontier
Generative AI uses models trained on large datasets to produce new data resembling the training distribution: text, images, music, code, or video.
Key architectures
- Variational Autoencoders (VAEs): Learn latent representations for structured generation.
- Generative Adversarial Networks (GANs): Use generator–discriminator interplay to synthesize realistic data.
- Diffusion Models: Iteratively denoise random noise to generate high-quality samples; used in systems like DALL·E 3 and Stable Diffusion.
- Large Language Models (LLMs): Autoregressive transformers trained on vast text corpora to generate coherent language.
Fine-tuning or prompting enables control over generative outputs (style, tone, content).
The future: toward general artificial intelligence
Artificial General Intelligence (AGI) refers to systems with human-level cognitive flexibility - capable of understanding, learning, and transferring knowledge across diverse domains.
While AGI remains aspirational, advances in foundation models, reinforcement learning, and embodied AI point toward incremental progress. index.php?title=Category:KC AI technical aspects



