Machine Learning (ML) is a branch of Artificial Intelligence that enables computers to learn patterns from data and make decisions without being explicitly programmed. Instead of manually writing rules, we provide examples, and the machine learns from them.
Machine Learning is widely used in modern applications:
ML helps organizations analyze data, automate tasks, and build intelligent services.
A typical ML workflow includes:
Here is a simple example of training a linear regression model in Python:
from sklearn.linear_model import LinearRegression
import numpy as np
# Example training data
X = np.array([[1], [2], [3], [4]]) # Features
y = np.array([2, 4, 6, 8]) # Target
model = LinearRegression()
model.fit(X, y)
prediction = model.predict([[5]])
print("Prediction for x=5:", prediction[0])
Loading comments...