Data Science & Machine Learning
Join this channel to learn data science, artificial intelligence and machine learning with funny quizzes, interesting projects and amazing resources for free For collaborations: @love_data
Mostrar más📈 Análisis del canal de Telegram Data Science & Machine Learning
El canal Data Science & Machine Learning (@datasciencefun) en el segmento lingüístico de Inglés es un actor destacado. Actualmente la comunidad reúne a 77 741 suscriptores, ocupando la posición 2 010 en la categoría Educación y el puesto 3 917 en la región India.
📊 Métricas de audiencia y dinámica
Desde su creación el невідомо, el proyecto ha mostrado un crecimiento acelerado, reuniendo a 77 741 suscriptores.
Según los últimos datos del 25 octubre, 2026, el canal mantiene una actividad estable. En los últimos 30 días la variación de miembros fue de 175, y en las últimas 24 horas de 0, conservando un alto alcance.
- Estado de verificación: No verificado
- Tasa de interacción (ER): El promedio de interacción de la audiencia es 2.75%. Durante las primeras 24 horas tras publicar, el contenido suele obtener 1.13% de reacciones respecto al total de suscriptores.
- Alcance de las publicaciones: Cada publicación recibe en promedio 2 139 visualizaciones. En el primer día suele acumular 882 visualizaciones.
- Reacciones e interacción: La audiencia responde de forma activa: el promedio de reacciones por publicación es 3.
- Intereses temáticos: El contenido se centra en temas clave como learning, accuracy, distribution, panda, dataset.
📝 Descripción y política de contenido
El autor describe el recurso como un espacio para expresar opiniones subjetivas:
“Join this channel to learn data science, artificial intelligence and machine learning with funny quizzes, interesting projects and amazing resources for free
For collaborations: @love_data”
Gracias a la alta frecuencia de actualizaciones (últimos datos recibidos el 26 octubre, 2026), el canal mantiene la vigencia y un amplio alcance. La analítica demuestra que la audiencia interactúa activamente con el contenido, lo que lo convierte en un punto de referencia dentro de la categoría Educación.
SELECT name
FROM customers;
Here:
SELECT → What to retrieve
FROM → Where to retrieve it from
🔹 12. SQL Case Sensitivity
SQL keywords are commonly written in uppercase:
SELECT
FROM
WHERE
This improves readability.
For example:
SELECT customer_id, name
FROM customers;
is easier to read than:
select customer_id,name from customers;
Most SQL database systems treat keywords as case-insensitive, although behavior regarding identifiers such as table and column names can vary by database system and configuration.
Recommended style:
Use:
UPPERCASE for SQL keywords
lowercase or snake_case for column/table names
🔹 13. Column Aliases
You can temporarily give a column a different name using AS.
Example:
SELECT
name AS customer_name
FROM customers;
The result will display:
customer_name
Alice
Bob
Carol
The original column name in the database is not changed.
The alias only changes how the result is displayed.
🔹 14. Aliases Without AS
In many SQL systems, you can also write:
SELECT
name customer_name
FROM customers;
However, using AS is generally clearer:
SELECT
name AS customer_name
FROM customers;
🔹 15. Calculations in SELECT
SQL can perform calculations.
Suppose we have:
price
quantity
We can calculate total sales:
SELECT
price,
quantity,
price * quantity AS total_amount
FROM orders;
This creates a calculated column:
total_amount = price × quantity
This ability becomes extremely useful in Data Analytics.
🔹 16. Using SELECT with Expressions
You can perform various calculations.
Example:
SELECT
salary,
salary * 12 AS annual_salary
FROM employees;
If monthly salary is:
₹50,000
then:
annual_salary = ₹600,000
The original database isn't modified.
The calculation is performed when the query runs.
🔹 17. Selecting Constants
SQL can also return constant values.
Example:
SELECT
'Data Science' AS course;
Result:
course
Data Science
You can also use numbers:
SELECT
2026 AS year;
Result:
year
2026
This becomes useful when constructing analytical datasets.
🔹 18. DISTINCT
DISTINCT is part of the roadmap and we'll study it properly later.
For now, understand its basic purpose:
It returns unique values.
Suppose:
city
Pune
Mumbai
Pune
Delhi
Mumbai
Query:
SELECT DISTINCT city
FROM customers;
Result:
Pune
Mumbai
Delhi
Duplicate values are removed from the result.
🔹 19. SELECT DISTINCT on Multiple Columns
You can use multiple columns:
SELECT DISTINCT city, department
FROM employees;
Important:
DISTINCT applies to the combination of selected columns.
So if two rows have the same city but different departments, they are considered different combinations.
🔹 20. SQL Query Example
Imagine an orders table:customer_id | name | city | age
101 | Alice | Mumbai | 28
102 | Bob | Pune | 32
103 | Carol | Delhi | 25
You can use SQL to retrieve specific information from this table.
🔹 2. What Is a Database?
A database is a structured system used to store and manage data.
A relational database stores information in tables.
For example:
Customers
Contains customer information.
Orders
Contains order information.
Products
Contains product information.
These tables can be related using common columns such as:
customer_id
This becomes extremely important when we learn JOINs.
🔹 3. What Is a Table?
A table consists of:
Rows
Each row generally represents one record.
Example: One customer
Columns
Each column represents an attribute.
Example: customer_id, name, city, age
So:
Row → Record
Column → Attribute
🔹 4. Your First SQL Query
The basic SQL query is:
SELECT *
FROM customers;
Let's break it down:
SELECT
Specifies what data you want.
*
Means: Select all columns.
FROM
Specifies the table from which you want the data.
customers
The table name.
So the query means:
Give me all columns from the customers table.
🔹 5. Selecting Specific Columns
You don't always need every column.
Suppose you only want:
Customer ID
Customer name
Use:
SELECT customer_id, name
FROM customers;
Result:
customer_id | name
101 | Alice
102 | Bob
103 | Carol
This is usually better than using SELECT * when you only need a few columns.
🔹 6. Selecting One Column
You can select a single column:
SELECT name
FROM customers;
Result:
name
Alice
Bob
Carol
🔹 7. Selecting Multiple Columns
Separate column names using commas:
SELECT name, city, age
FROM customers;
This returns only those three columns.
🔹 8. What Does * Mean?
The asterisk:
*
means: All columns.
Example:
SELECT *
FROM customers;
If the table has 10 columns, the query returns all 10.
However, in production environments, it is often better to explicitly specify the columns you need.
Instead of:
SELECT *
FROM customers;
prefer:
SELECT customer_id, name, city
FROM customers;
when those are the only fields required.
🔹 9. SQL Statements and Semicolon
SQL statements are commonly terminated with:
;
Example:
SELECT name
FROM customers;
The semicolon indicates the end of the SQL statement in many SQL environments.
🔹 10. SQL Is Declarative
This is an important concept.
When you write:
SELECT name
FROM customers;Bayesian Statistics is an approach to statistical inference that combines prior information with observed data to produce a posterior distribution representing updated beliefs about unknown parameters.💡 What are Prior, Likelihood and Posterior?
Prior represents information before observing the new data, likelihood describes how compatible the observed data is with different parameter values, and posterior represents the updated distribution after combining the prior and likelihood.💡 MLE vs MAP?
MLE estimates parameters using only the likelihood, while MAP combines the likelihood with a prior distribution.🎯 Practice Questions Q1. What are the three main components of Bayesian inference? Q2. What is the difference between prior and posterior probability? Q3. What is the difference between MLE and MAP? Q4. Why is the base rate important in Bayesian reasoning? Q5. What is the main difference between a confidence interval and a credible interval? 🎯 Key Takeaways ✅ Bayesian Statistics = Prior + Data → Posterior ✅ Prior = Belief/information before observing new data. ✅ Likelihood = How compatible the observed data is with different parameter values. ✅ Posterior = Updated belief after considering the data. ✅ Posterior ∝ Prior × Likelihood ✅ MLE uses likelihood. ✅ MAP uses prior + likelihood. ✅ Bayesian methods naturally represent uncertainty using probability distributions. ✅ Naive Bayes is a major Machine Learning algorithm based on Bayes' theorem. ✅ Bayesian inference is especially useful when information arrives sequentially and beliefs need to be updated. 👉 Double Tap ❤️ For More ----- 1.56 ₽ · /balance_help
from scipy.stats import beta
alpha_prior = 2
beta_prior = 2
successes = 7
failures = 3
alpha_posterior = alpha_prior + successes
beta_posterior = beta_prior + failures
posterior_mean = alpha_posterior / (alpha_posterior + beta_posterior)
print("Posterior Mean:", posterior_mean)What is the probability that this person actually has the disease?This is not simply 99%. We need to consider: The prior probability of the disease, The probability of a positive test among people with the disease, The probability of a positive test among people without the disease. Bayes' theorem combines these pieces of information. 🔹 8. Solving the Example Let's assume: P(Disease) = 0.01 P(Positive | Disease) = 0.99 P(No Disease) = 0.99 P(Positive | No Disease) = 0.05 First calculate the overall probability of a positive test: P(Positive) = (0.99 × 0.01) + (0.05 × 0.99) = 0.0099 + 0.0495 = 0.0594 Now: P(Disease | Positive) = (0.99 × 0.01) / 0.0594 ≈ 0.167 So the probability is approximately 16.7%. This is much lower than 99%. Because the disease is relatively rare and false positives occur. This demonstrates why base rates matter. 🔹 9. Base Rate The base rate is the underlying frequency of an event in the population. In the previous example: Disease prevalence = 1%. That's the base rate. Ignoring the base rate can lead to incorrect conclusions. This is known as the Base Rate Fallacy. A test can be highly accurate while the probability that a randomly selected person with a positive result actually has the disease can still be considerably lower than expected if the condition is rare. 🔹 10. Bayesian Updating One of the most useful ideas in Bayesian Statistics is updating. Suppose we initially believe: Probability of an event = 20%. Then we observe strong evidence supporting the event. Our posterior might become: 45%. Then we receive additional evidence. The probability might update again: 65%. The process continues as new evidence arrives. So Bayesian inference is naturally suited to situations where:
New information arrives continuously.🔹 11. Prior, Likelihood and Posterior A simple way to remember the three: 🟦 Prior - What did I believe before seeing the data? 🟨 Likelihood - How strongly does the observed data support different possibilities? 🟩 Posterior - What do I believe after considering the data? Remember: Posterior ∝ Prior × Likelihood 🔹 12. Bayesian vs Frequentist Statistics Frequentist Approach: Generally treats unknown parameters as fixed but unknown. Probability is associated with the behavior of random data and procedures. Examples include: p-values, Confidence intervals, Hypothesis testing Bayesian Approach: Treats uncertainty about parameters using probability distributions. It combines: Prior information + Data → Posterior. Examples include: Posterior distributions, Credible intervals, Bayesian parameter estimation 🔹 13. Confidence Interval vs Credible Interval Confidence Interval: A frequentist concept. A 95% confidence interval is interpreted through the long-run behavior of the procedure that generates the interval. Credible Interval: A Bayesian concept.
Start with prior information, observe new data, and update your belief to obtain a posterior distribution.Bayesian methods are widely used in: Machine Learning, Classification, Medical diagnosis, Spam detection, Risk analysis, Recommendation systems, A/B testing, Natural Language Processing. 🔹 1. What Is Bayesian Statistics? Suppose a company wants to determine whether a customer is likely to purchase a product. Before seeing any new information, we may already have some historical knowledge about the customer's purchase probability. Then we observe new information: Previous purchases, Website activity, Product views, Time spent on the website. We can combine the previous information with the new evidence. This produces an updated belief. That is the basic idea of Bayesian Statistics. 🔹 2. Bayes' Theorem Bayesian inference is based on Bayes' Theorem. The simple form is: P(A | B) = [P(B | A) × P(A)] / P(B) Where: P(A | B) = Probability of A given B P(B | A) = Probability of B given A P(A) = Prior probability of A P(B) = Probability of observing B In Bayesian terminology: Posterior ∝ Likelihood × Prior This is one of the most important relationships to remember. 🔹 3. Prior Probability The prior represents our initial belief about a parameter or hypothesis before observing the new data. For example: Suppose historical data shows that approximately 10% of customers purchase a particular product. Before analyzing today's customer behavior, we might use: Prior probability = 10% The prior can come from: Historical data, Previous experiments, Domain knowledge, Earlier studies, Expert knowledge 🔹 4. Likelihood The likelihood tells us how compatible the observed data is with a particular hypothesis or parameter value. Suppose we observe that a customer: Visited the product page 10 times, Added the product to the cart, Returned to the website multiple times We can ask:
How likely is this behavior if the customer is actually going to purchase?This information contributes to the likelihood. 🔹 5. Posterior Probability The posterior is our updated belief after considering the observed data. In simple terms: Prior + Evidence → Posterior For example: Before observing new behavior: Purchase probability = 10%. After observing strong purchase-related behavior: Updated probability = 35%. The 35% represents our updated belief based on the evidence and prior information. 🔹 6. The Bayesian Process Bayesian inference can be thought of as a cycle: Step 1: Start with a Prior - What did we believe before seeing the new data? Step 2: Collect Data - Observe new evidence. Step 3: Calculate Likelihood - How compatible is the evidence with different possibilities? Step 4: Update - Combine prior and likelihood. Step 5: Obtain Posterior - The posterior becomes our updated belief. 🔹 7. Simple Example: Medical Testing
