Machine learning (ML) and Deep learning: Difference between revisions

From A Technological Wiki
Jump to navigation Jump to search
imported>Unknown user
No edit summary
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 5: Line 5:


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.
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.
-----


<span id="structured-and-unstructured-data-learning-by-trial-and-error"></span>
<span id="structured-and-unstructured-data-learning-by-trial-and-error"></span>
== Structured and unstructured data; Learning by Trial and Error ==


= 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.
Machines can learn from structured or unstructured data and can improve autonomously using trial-and-error learning.


<span id="data-types"></span>
= Data types =
=== Data types ===
 
* '''Structured data:''' Tabular data with well-defined schema (rows, columns, types). Examples: spreadsheets, SQL tables.
* '''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.
* '''Unstructured data:''' Text, images, audio, videos, or sensor data - not easily represented as tables.


<span id="learning-types"></span>
= Learning types =
=== Learning types ===
 
* '''Supervised learning:''' Uses labeled data; the model learns to map inputs to outputs.
* '''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).
* '''Unsupervised learning:''' Finds patterns or structure in unlabeled data (e.g., clustering, dimensionality reduction).
Line 31: Line 24:
Self-learning agents require exploration–exploitation balance (ε-greedy, entropy regularization) and stability mechanisms such as experience replay.
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


<span id="classical-machine-learning-methods"></span>
<span id="classical-machine-learning-methods"></span>
== Classical Machine Learning methods ==


ML tools include logical and statistical models such as decision trees, linear regression, and logistic regression.
= Machine learning algorithms =
== Linear Regression ==
<p>Models continuous outcomes using linear relationships.
</p>[[File:UserDocumentation_Knowledge_Central_KC_Global_KC_AI_KC_AI_technical_aspects_Machine_learning_and_Deep_learningimage-20251017-121721.png|225x225px]]


<span id="common-algorithms"></span>
[[Machine learning algorithms#linear regression|Here it is a practical example]]
=== Common algorithms ===


<ul>
== Logistic Regression ==
<li><p>'''Decision Trees:''' Hierarchical models that split data based on feature thresholds. Easy to interpret but prone to overfitting.<br />
<p>Models binary or multi-class outcomes via a sigmoid function mapping. Useful for predicting the probability of anything being true or false.
</p>
</p>[[File:UserDocumentation_Knowledge_Central_KC_Global_KC_AI_KC_AI_technical_aspects_Machine_learning_and_Deep_learningimage-20251017-121807.png|275x275px]]
<p>[[File:UserDocumentation_Knowledge_Central_KC_Global_KC_AI_KC_AI_technical_aspects_Machine_learning_and_Deep_learningimage-20251017-121908.png|292px|center]]</p></li>
<li><p>'''Linear Regression:''' Models continuous outcomes using linear relationships.<br />
</p>
<p>[[File:UserDocumentation_Knowledge_Central_KC_Global_KC_AI_KC_AI_technical_aspects_Machine_learning_and_Deep_learningimage-20251017-121721.png|225px|center]]</p></li>
<li><p>'''Logistic Regression:''' Models binary or multi-class outcomes via a sigmoid function mapping. Useful for predicting the probability of anything being true or false.<br />
</p>
<p>[[File:UserDocumentation_Knowledge_Central_KC_Global_KC_AI_KC_AI_technical_aspects_Machine_learning_and_Deep_learningimage-20251017-121807.png|275px|center]]</p></li></ul>


<span id="other-algorithms"></span>
[[Machine learning algorithms#logistic regression|Here is a practical example]]
=== Other algorithms ===


* '''Random Forests:''' Ensembles of decision trees averaged to improve generalization.
== K-Nearest Neighbors (KNN) ==
* '''Support Vector Machines (SVM):''' Classify data using hyperplanes that maximize margin between classes.
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.
* '''k-Nearest Neighbors (kNN):''' Classifies based on similarity (distance metrics) to nearby samples.
[[File:Ml algorithm knn.jpg|none|thumb]]
[[Machine learning algorithms#K-Nearest Neighbors (KNN)|Here is a practical example]]


== Decision Trees ==
<p>Hierarchical models that split data based on feature thresholds. Easy to interpret but prone to overfitting.
</p>[[File:UserDocumentation_Knowledge_Central_KC_Global_KC_AI_KC_AI_technical_aspects_Machine_learning_and_Deep_learningimage-20251017-121908.png|292x292px]]


-----
[[Machine learning algorithms#decision trees|Here is a practical example]]


<span id="neural-networks-and-perceptrons"></span>
== Other algorithms & examples ==
== Neural Networks and Perceptrons ==
Check in detail these algorithms and real implementations in python [[Machine learning algorithms|here]]


= Deep learning: neural networks and perceptrons =
Neural networks, inspired by the brain, use algorithmic nodes (perceptrons) arranged in layers to perform complex computations.
Neural networks, inspired by the brain, use algorithmic nodes (perceptrons) arranged in layers to perform complex computations.


Line 76: Line 85:
<li><p>'''Output layer:''' Produces the final prediction or classification.<br />
<li><p>'''Output layer:''' Produces the final prediction or classification.<br />
</p>
</p>
<p>[[File:UserDocumentation_Knowledge_Central_KC_Global_KC_AI_KC_AI_technical_aspects_Machine_learning_and_Deep_learningimage-20251017-122035.png|326px|center]]</p></li></ul>
<p>[[File:UserDocumentation_Knowledge_Central_KC_Global_KC_AI_KC_AI_technical_aspects_Machine_learning_and_Deep_learningimage-20251017-122035.png|326x326px]]</li></ul>
</li></ul>
</li></ul>


 
== Multi-layered perceptrons and beyond ==
-----
 
<span id="deep-learning-multi-layered-perceptrons-and-beyond"></span>
== Deep Learning: multi-layered perceptrons and beyond ==
 
Multiple perceptron layers, arranged differently, expand machine learning into deep learning.
Multiple perceptron layers, arranged differently, expand machine learning into deep learning.


Line 93: Line 97:
* '''Recurrent Neural Networks (RNNs), LSTMs, GRUs:''' Handle sequences (text, audio, time series).
* '''Recurrent Neural Networks (RNNs), LSTMs, GRUs:''' Handle sequences (text, audio, time series).
* '''Transformers:''' Use attention mechanisms; now dominate NLP, vision, and multimodal tasks.
* '''Transformers:''' Use attention mechanisms; now dominate NLP, vision, and multimodal tasks.
-----


<span id="broad-ai-and-everyday-interactions"></span>
<span id="broad-ai-and-everyday-interactions"></span>
== Broad AI and everyday interactions ==


= Broad AI and everyday interactions =
* '''Narrow AI (Weak AI):''' Designed for a specific task (e.g., spam detection, recommendation).
* '''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.
* '''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.
* Examples: digital assistants (Siri, Alexa, Google Assistant), recommender systems, chatbots, and adaptive user interfaces.
-----


<span id="generative-ai-the-new-creative-frontier"></span>
<span id="generative-ai-the-new-creative-frontier"></span>
== Generative AI: the new creative frontier ==


= 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.
Generative AI uses models trained on large datasets to produce new data resembling the training distribution: text, images, music, code, or video.


<span id="key-architectures"></span>
== Key architectures ==
=== Key architectures ===
 
* '''Variational Autoencoders (VAEs):''' Learn latent representations for structured generation.
* '''Variational Autoencoders (VAEs):''' Learn latent representations for structured generation.
* '''Generative Adversarial Networks (GANs):''' Use generator–discriminator interplay to synthesize realistic data.
* '''Generative Adversarial Networks (GANs):''' Use generator–discriminator interplay to synthesize realistic data.
Line 121: Line 117:


Fine-tuning or prompting enables control over generative outputs (style, tone, content).
Fine-tuning or prompting enables control over generative outputs (style, tone, content).
-----


<span id="the-future-toward-general-artificial-intelligence"></span>
<span id="the-future-toward-general-artificial-intelligence"></span>
== The future: toward general artificial intelligence ==


= 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.
'''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.
While AGI remains aspirational, advances in foundation models, reinforcement learning, and embodied AI point toward incremental progress.
<!-- From bodyContent 52625434.mraw -->
[[index.php?title=Category:KC AI technical aspects]]
 

Latest revision as of 09:27, 1 November 2025

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:

  1. Classical (statistical) machine learning: Relies on explicit features and interpretable models, often grounded in linear algebra, calculus, and probability theory.
  2. 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.

Here is a practical example

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.

Here is a practical example

Decision Trees

Hierarchical models that split data based on feature thresholds. Easy to interpret but prone to overfitting.

Here is a practical example

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:

    • Input layer: Receives data.

    • Hidden layers: Transform data through nonlinear activations.

    • Output layer: Produces the final prediction or classification.

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