Total Pageviews

Monday, August 10, 2026

MACHINE LEARNING USING PYTHON


1. scikit-learn  CLICK
2. NumPy    CLICK
3. SciPy  CLICK
4. matplotlib 
5. pandas  CLICK





Data 1.1 Data 1.2 Data 1.3 Data 1.4 Data 1.5 Data 1.6
Kmeans cluster Data 2.2 Data 2.3 Data 2.4 Data 2.5Data 2.6
DATA MINING CLICK
DATA WAREIHOUSE- CLICK Data 3.3 Data 3.4 Data 3.5 Data 3.6
Data 4.1 Data 4.2 Data 4.3 Data 4.4 Data 4.5 Data 4.6










Supervised Learning Models  -> CLICK

Unsupervised Learning Models  -> CLICK

Semi-Supervised Learning-> CLICK

Reinforcement Learning -> CLICK

Deep Learning (Neural Networks) ->CLICK


    Different type of models used in Machine Learning in Python ->  CLICK

   which model and when? -

Training data is processed using three primary machine learning frameworks: 
1. supervised learning (using labeled data to predict outcomes), 
2.unsupervised learning (finding hidden patterns in unlabeled data), and 
3. reinforcement learning (learning via trial, error, and rewards).


                                                                START
                                                                      │
                                                          Do you have Y?
                                                           /                       \
                                                      YES                      NO
                                                      │                            │
                                  What type is Y?               What do you need?
                                       /           \                           /                  |        \
                         Category       Number            Groups   Reduce    Outliers
                                    │              │                        │      dimensions    │
                                    ↓               ↓                         ↓              ↓               ↓
                        Classification  Regression  Clustering  PCA   Isolation
                             │                        │                        │                      Forest
                             ↓                          ↓                       ↓
 ┌──────────┐   ┌───────────┐   ┌──────────┐
 │ Logistic              │   │ Linear                   │   │ K-Means           │
 │ Random             │   │ Ridge                    │   │ DBSCAN           │
 │ Forest                 │   │ Random               │   │ HDBSCAN        │
 │ SVM                   │   │ Forest                   │   │ GMM                │
 │ KNN                   │   │ Gradient              │   │ Spectral             │
 │ Naive                  │   │ Boosting               │   │                            │
 │ Bayes                  │   │ SVR                      │   │                            │
 └──────────┘   └───────────┘   └──────────┘




 1. Predicting a Number (Regression)

If your goal is to forecast a continuous, numerical value, you will use Supervised Regression models.
  • Example Use Case: Predicting home prices, forecasting stock trends, or estimating delivery times.
  • Common Models: Linear Regression, Random Forest Regressor, or Gradient Boosting (XGBoost).
2. Sorting Categories (Classification)
If your goal is to assign data points into distinct, predefined buckets, you will use Supervised Classification models
  • Example Use Case: Sorting emails into "Spam" or "Inbox", identifying if an image shows a cat or a dog, or predicting if a transaction is fraudulent.
  • Common Models: Logistic Regression, Support Vector Machines (SVM), Random Forest Classifier, or Neural Networks. 
3. Grouping Data (Clustering)
If your goal is to find hidden patterns and group data together without knowing the categories in advance, you will use Unsupervised Clustering models
  • Example Use Case: Segmenting customers by purchasing behavior, grouping similar news articles together, or finding anomalies in network traffic.
  • Common Models: K-Means Clustering, Hierarchical Clustering, or DBSCAN.


Feature / CapabilityScikit-learnPyTorchTensorFlow
Primary FocusTraditional ML & Tabular DataDeep Learning & ResearchProduction Deep Learning
HardwareCPU OnlyGPU & TPU AccelerationGPU & TPU Acceleration
Data ScalingSmall to Medium (Spreadsheets/CSVs)Massive (Images, Audio, Text)Massive (Big Data pipelines)
Graph TypeStatic Execution (Pre-built APIs)Dynamic Graph (Pythonic/Flexible)Static Graph (Highly Optimized)
Code ComplexityLow (model.fit() & model.predict())Medium to High (Custom training loops)Medium (via high-level Keras API)







Model FamilyInterpretabilityHandles High Dimensions?Training SpeedPrimary Weakness
Linear Models
(e.g., Logistic Regression)
High
(Direct feature weights)
No
(Prone to underfitting)
FastCannot capture complex nonlinear rules
Tree/Ensemble Models
(e.g., Random Forest)
Medium
(Feature importance scores)
ModerateMediumLarge memory footprint for deep trees
Distance-Based Models
(e.g., K-Nearest Neighbors)
Low
(Instance-dependent)
No
(Suffers from "curse of dimensionality")
Instant
(No active training phase)
Inference slows down heavily as dataset grows
Kernel/Matrix Methods
(e.g., Support Vector Machines)
Low
(Black-box decision boundaries)
YesSlow on large dataComputationally expensive tuning (O(n³) scaling)
Neural Networks
(Deep Learning)
None
(Millions of abstract weights)
YesVery Slow
(Requires epochs on GPUs)
Prone to overfitting without massive training data









Models Uset to train:
1. Classification (Sorting Categories)
Classification predicts categorical outputs, meaning it assigns data into predefined classes like spam/non-spam emails or disease risk categories. These algorithms learn to map input features to discrete labels. Here are some classification algorithms:

Logistic Regression
Decision Tree
Random Forest
K-Nearest Neighbors (KNN)
Naive Bayes
Support Vector Machine


2. Regression(Predicting Numbers)

Regression, predicts continuous values, such as house prices or product sales. It learns the relationship between input features and a numerical target variable. Here are some regression algorithms:

Linear Regression
Polynomial Regression
Ridge Regression
Lasso Regression
Decision tree
Random Forest


1. Clustering (Grouping Unlabeled Data)

Clustering is the process of grouping data points into clusters based on their similarity. This technique is useful for identifying patterns and relationships in data without the need for labeled examples. Common techniques include:

K-Means
DBSCAN
Mean-shift

2. Dimensionality Reduction Techniques

Dimensionality reduction helps reduce the number of features while preserving important information. Common techniques include:

Principal Component Analysis
Independent Component Analysis

3. Association Rule Learning

Association rule learning is a technique for discovering relationships between items in a dataset. It identifies rules that indicate the presence of one item implies the presence of another item with a specific probability. Common techniques include:

Apriori
FP-growth
Eclat






Here are some of most common reinforcement learning algorithms:


Q-learning: Learns the best action for each state based on expected rewards.
SARSA (State-Action-Reward-State-Action): Similar to Q-learning but updates values for the action actually taken.
Deep Q-learning: Uses neural networks to handle complex state-action relationships
Types of Reinforcement Learning
Positive Reinforcement: Rewards desired behavior (e.g., giving points for correct answers).
Negative Reinforcement: Removes negative outcomes to encourage good actions (e.g., turning off a buzzer after the right move).




















No comments:

Post a Comment