Skip to content

Commit

Permalink
fix: convert opengraph png references to jpg
Browse files Browse the repository at this point in the history
Signed-off-by: Akshay "XA" Mestry <[email protected]>
  • Loading branch information
xames3 committed Feb 17, 2024
1 parent cda6678 commit cda550a
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.. _demystifying-buzzwords:

:og:description: Exploring the intricacies of AI and Machine Learning.
:og:image: https://raw.githubusercontent.com/xames3/learn/main/docs/source/_static/assets/learn-opengraph-demystifying-banner.png
:og:image: https://raw.githubusercontent.com/xames3/learn/main/docs/source/_static/assets/learn-opengraph-demystifying-banner.jpg
:og:image:alt: Demystifying the Buzzwords
:og:title: Demystifying the Buzzwords

Expand Down
145 changes: 131 additions & 14 deletions docs/source/_documentation/chapters/mathematics-for-ai.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
.. Author: Akshay Mestry <[email protected]>
.. Created on: Saturday, February 10 2023
.. Last updated on: Thursday, February 15 2023
.. Last updated on: Friday, February 16 2024
.. _mathematics-for-ai:

:og:description: Importance of Mathematics and its Properties.
:og:image: https://raw.githubusercontent.com/xames3/learn/main/docs/source/_static/assets/learn-opengraph-mathematics-banner.jpg
:og:image:alt: Mathematics
:og:title: The Universal Language

###################################
Mathematics: The Universal Language
###################################
Expand All @@ -22,7 +27,7 @@ understanding Machine Learning and the broader realms of AI taught me that the
mastery of mathematical principles is not just beneficial, but essential.
Thus, as I pen this chapter, I aim to demystify the common mathematical
notations and emphasize their pivotal roles in the AI domain. This segment,
at its heart, embodies the *"notation"* aspect of L.E.A.R.N., designed to lay
at its heart, embodies the ``notation`` aspect of L.E.A.R.N, designed to lay
a foundational bedrock for those who, like me at the outset, may find
themselves at the threshold of this vast knowledge domain without a map.

Expand Down Expand Up @@ -52,7 +57,7 @@ a dialogue that transcends linguistic and geographical boundaries.
|tab| Yet, to say that mathematics is a universal language does not merely
point to its role as a facilitator of communication across disciplines. It is
also to recognize the innate human capacity to understand and manipulate
abstract concepts, to see patterns in the chaos, and to derive meaning from
abstract concepts, to see patterns in chaos, and to derive meaning from
the seemingly impossible things. This language, with its numbers and symbols,
speaks to a shared human experience, an underlying harmony that courses
through the fabric of reality. As I go deeper into the realms of Artificial
Expand All @@ -62,7 +67,7 @@ desire to decode the complexity of our world. Through these mathematical
models and algorithms, we teach machines to learn, to perceive, and to make
decisions. Mathematics, in this context, is not just a tool but a bridge
between human intelligence and artificial cognition, a means through which we
*"inspire"* machines with the ability to understand and interact with the
``inspire`` machines with the ability to understand and interact with the
world.

**********************************
Expand Down Expand Up @@ -92,13 +97,14 @@ microscopic intricacies of the quantum world alike. Each symbol, each sign,
carries within it a world of meaning, a distilled essence of human
understanding that transcends cultural and linguistic divides. In the sphere
of Artificial Intelligence, this language finds its most ardent disciple. AI,
in its myriad forms—from neural networks that mimic the neural pathways of the
human brain to algorithms that sift through data with unerring accuracy—relies
wholly on the language of mathematics. It is through this language that we
instruct machines, encode algorithms, and define the very parameters of AI's
learning and functioning. The precision of mathematics allows for the creation
of AI systems that can learn from data, identify patterns, and make decisions
with a level of accuracy that often surpasses human capability.
in its myriad forms |dash| from neural networks that mimic the neural pathways
of the human brain to algorithms that sift through data with unerring
accuracy |dash| relies wholly on the language of mathematics. It is through
this language that we instruct machines, encode algorithms, and define the
very parameters of AI's learning and functioning. The precision of mathematics
allows for the creation of AI systems that can learn from data, identify
patterns, and make decisions with a level of accuracy that often surpasses
human capability.

From Symbols to Sentience
#########################
Expand Down Expand Up @@ -128,13 +134,124 @@ with a level of precision and safety that humans struggle to achieve, AI
demonstrates the practical power of mathematics as a language.

|tab| In reflecting on my above phrase about signs and symbols, we see a
profound truth about the nature of intelligenceboth human and artificial. It
is a reminder that at the core of all we endeavor to achieve lies a language
that is both ancient and infinitely capable of innovation.
profound truth about the nature of intelligence |dash| both human and
artificial. It is a reminder that at the core of all we endeavor to achieve
lies a language that is both ancient and infinitely capable of innovation.
Mathematics, with its signs and symbols, is not just a tool for communication;
it is the very bedrock upon which the foundation of Artificial Intelligence
stands. As we continue to explore and expand the boundaries of what AI can
achieve, we do so by delving ever deeper into the mathematical language that
underpins the fabric of reality, crafting a future where the line between the
created and the creator becomes ever more blurred, united by the universal
language of mathematics.

*******************************
From Numbers to Neural Networks
*******************************

I hope my above discussions have illuminated the indispensable role of
mathematics in Artificial Intelligence. As we delve deeper, moving from
theoretical foundations to practical applications, it's crucial to demystify
the mathematical notations and symbols that may seem like distant memories
from our high school classes. It's a shift from the philosophical to the
practical, a step closer to the very essence of how mathematics intertwines
with AI in the real world.

The Fundamentals
################

Our exploration begins with the fundamentals |dash| numbers. A concept so
basic that even toddlers grasp it in its simplest form. Yet, as we venture
deeper, the complexity unfolds. In the realm of computing and programming,
numbers transform and transcend their everyday appearances. While our digital
companions, the computers, operate within the binary constraints of zeros and
ones, the mathematical domain they navigate is infinitely richer. From
decimals to negatives, mathematics spans a spectrum far beyond the binary's
simplistic dichotomy. You might wonder, how these machines interpret and
manipulate the vast array of mathematical concepts using just two digits. The
journey from the binary ``101`` representation of the decimal number ``5``
to performing intricate calculations is nothing short of miraculous. It's a
testament to the ingenuity of programming and algorithm design, which
translates the rich, complex language of mathematics into a form
comprehensible by machines.

|tab| In the realm of Artificial Intelligence, mathematics is not just a tool;
it is the very essence that breathes life into the algorithms and models that
define AI. As we continue our journey, it's crucial to understand that AI, in
its quest to emulate human intelligence relies on a myriad of mathematical
structures and theories. These include but are not limited to, statistics for
making predictions, calculus for understanding change, and linear algebra for
data representation and manipulation. Consider, for example, the concept of a
Neural Network |dash| a cornerstone of modern AI and Deep Learning. At its
heart, a Neural Network is a tapestry woven from the threads of mathematical
equations, each node and connection representing a mathematical function. The
beauty of these networks lies in their ability to learn and adapt, to
fine-tune their parameters in response to the data they encounter. This
process, known as ``training``, is grounded in calculus and optimization,
illustrating how mathematics empowers machines to learn from experience, much
like humans do.

Power of Algorithms and their Sustainability
############################################

Furthermore, the role of algorithms in AI cannot be overstated. An algorithm,
in its essence, is a set of mathematical instructions or rules that dictate
the steps needed to solve a problem. From sorting data to making decisions,
algorithms are the brain behind the AI's ability to perform tasks.
The elegance of algorithms lies in their universality. A well-designed
algorithm can be applied across different domains, from recognizing speech to
diagnosing diseases, showcasing the versatile power of mathematical logic in
AI. Yet, the journey from mathematical theory to practical AI application is
caught with challenges. The complexity of translating human understanding into
a language that machines can interpret involves not just technical prowess but
also a deep philosophical understanding of what it means to ``know`` or
``learn``. It raises profound questions about the nature of intelligence and
the limits of machine learning.

|tab| In addressing these challenges, we also encounter the concept of
computational complexity |dash| how we measure the efficiency of algorithms
and the resources they require. This area, deeply
rooted in mathematical logic, is critical for developing AI systems that are
not only intelligent but also efficient and sustainable. As we stand on the
tall foundation of a future shaped by AI, it's clear that our journey through
the landscape of mathematics and programming is far from over. It is a path of
endless discovery, where each step forward in our understanding of mathematics
opens new doors for AI innovation. So let's start small, right from the basics.

Symphony of Numbers in Artificial Intelligence
##############################################

Before we delve into the complex algorithms and neural networks that form
the backbone of AI, it's essential to grasp the basics of the numbers that are
the building blocks of mathematical logic and computation. In the grand
orchestra of mathematics, different types of numbers play unique roles,
each contributing its distinct sound to the symphony of AI.

Real Numbers
************

Real numbers hold a place of paramount importance in the domain of Artificial Intelligence, acting as the bridge between the abstract world of mathematics and the concrete realities AI seeks to understand, interpret, and predict. I often consider real numbers as...

.. epigraph:: Mathematical entities which capture the continuum of possibility

Real numbers encompass the entire spectrum of values along the number line, representing both the measurable quantities and the constants that define our universe. From the speed of light to the probability of an event, real numbers provide a way to quantify the infinitely varied aspects of the world. In AI, this capability allows for the precise representation of data. Whether it's the temperature of a room, the price of a stock, or the hue of color in a photo, real numbers map these continuous variables into a form that machines can process and learn from. Machine learning models rely heavily on real numbers for both their input data and the weights within the models themselves. Consider a simple linear regression model, which predicts an outcome based on one or more input variables. The relationship between the input and output is defined by ``parameters`` (weights and biases), all of which are represented by real numbers.

.. code-block:: python
import numpy as np
from sklearn.linear_model import LinearRegression
# Sample data: hours studied vs exam score
X = np.array([[1], [2], [4], [5]]) # hours studied (input)
y = np.array([70, 80, 90, 95]) # exam score (output)
# Create and train the model
model = LinearRegression().fit(X, y)
# Predict the exam score for someone who studied 3 hours
predicted_score = model.predict(np.array([[3]]))
print(f"Predicted exam score: {predicted_score[0]}")
In this example, the input data (hours studied) and output data (exam scores) are real numbers, as are the model's parameters once it's trained. The model learns the relationship between studying time and exam score, capturing the essence of this relationship in its parameters. The precision offered by real numbers is critical in fields where even the slightest variation can have significant implications, such as in medical diagnoses, financial forecasting, and autonomous vehicle navigation. In these applications, the ability to work with real numbers allows AI systems to make nuanced decisions based on a detailed understanding of the data.

|tab| Deep learning, takes the importance of real numbers even further, using them in complex neural networks that mimic the way the human brain operates. Each neuron in a network processes input data (real numbers) through a series of weighted connections (also real numbers), applying nonlinear transformations to capture complex patterns and relationships in the data. Activation functions in neural networks, such as the ``sigmoid`` or ``ReLU`` functions, use real numbers to determine the output of neurons, introducing nonlinearity into the model and enabling it to learn from complicated data structures. The choice of activation function and the precise tuning of network weights (real numbers) are crucial for the model's performance and accuracy.
2 changes: 1 addition & 1 deletion docs/source/_documentation/intentions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.. _intentions:

:og:description: Author's intentions
:og:image: https://raw.githubusercontent.com/xames3/learn/main/docs/source/_static/assets/learn-opengraph-intentions-banner.png
:og:image: https://raw.githubusercontent.com/xames3/learn/main/docs/source/_static/assets/learn-opengraph-intentions-banner.jpg
:og:image:alt: Author's intentions
:og:title: Intentions

Expand Down
2 changes: 1 addition & 1 deletion docs/source/_documentation/introducing-learn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.. _introducing-learn:

:og:description: An introduction to L.E.A.R.N
:og:image: https://raw.githubusercontent.com/xames3/learn/main/docs/source/_static/assets/learn-opengraph-lets-learn-banner.png
:og:image: https://raw.githubusercontent.com/xames3/learn/main/docs/source/_static/assets/learn-opengraph-lets-learn-banner.jpg
:og:image:alt: Let's L.E.A.R.N!
:og:title: Let's Do It!

Expand Down
2 changes: 1 addition & 1 deletion docs/source/_documentation/preface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.. _preface:

:og:description: My heartiest gratitude to all!
:og:image: https://raw.githubusercontent.com/xames3/learn/main/docs/source/_static/assets/learn-opengraph-preface-banner.png
:og:image: https://raw.githubusercontent.com/xames3/learn/main/docs/source/_static/assets/learn-opengraph-preface-banner.jpg
:og:image:alt: Preface
:og:title: Preface

Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ class LearnProject(t.NamedTuple):
ogp_description_length = 300
ogp_enable_meta_description = True
ogp_image = (
"https://raw.githubusercontent.com/xames3/learn/main/docs/"
"source/_static/assets/learn-opengraph-home-banner.png"
"https://raw.githubusercontent.com/xames3/learn/main/docs/source/"
"_static/assets/learn-opengraph-home-banner.jpg"
)
ogp_image_alt = _project.alt_title + " Home Banner"
ogp_site_name = _project.alt_title
Expand Down

0 comments on commit cda550a

Please sign in to comment.