آموزش پایتون
کد 👇👇👇
import numpy as np
import matplotlib.pyplot as plt
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
# Generate synthetic data
np.random.seed(42)
X = np.linspace(0, 1, 30)
y = np.sin(2 * np.pi * X) + np.random.normal(0, 0.15, X.shape[0])
X = X.reshape(-1, 1)
# Split data into train and test sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)
# Set up plot
plt.figure(figsize=(18, 6))
degrees = [1, 3, 15] # Polynomial degrees to demonstrate different cases
cases = ['Underfitting (High Bias)', 'Good Fit (Proper Generalization)', 'Overfitting (High Variance)']
for i, degree in enumerate(degrees):
ax = plt.subplot(1, 3, i+1)
# Create polynomial regression model
model = make_pipeline(
PolynomialFeatures(degree=degree, include_bias=False),
LinearRegression()
)
model.fit(X_train, y_train)
# Generate predictions
X_plot = np.linspace(0, 1, 100).reshape(-1, 1)
y_plot = model.predict(X_plot)
y_train_pred = model.predict(X_train)
y_test_pred = model.predict(X_test)
# Calculate errors
train_error = mean_squared_error(y_train, y_train_pred)
test_error = mean_squared_error(y_test, y_test_pred)
# Plot results
plt.scatter(X_train, y_train, color='blue', label='Training Data', alpha=0.7)
plt.scatter(X_test, y_test, color='red', label='Test Data', alpha=0.7)
plt.plot(X_plot, y_plot, color='black', linewidth=2, label='Model Prediction')
plt.title(f'{cases[i]}\nTrain MSE: {train_error:.4f}, Test MSE: {test_error:.4f}')
plt.xlabel('Feature (X)')
plt.ylabel('Target (y)')
plt.legend()
plt.ylim(-1.5, 1.5)
plt.grid(True)
plt.tight_layout()
plt.show()
✔️ چهار مدل اصلی شبکههای عمیق رو واقعاً میشناسی؟
هوش مصنوعی فقط یک مدل نداره!
هر شبکه عمیق (Deep Network) برای یک کار تخصصی ساخته شده:
▪️ یکی برای تشخیص تصویر
▪️ یکی مخصوص صدا و متن
▪️ یکی برای تولید تصویر
▪️ و یکی هم قلب تپنده مدلهای زبانی مثل ChatGPT!
توی این اسلایدها خیلی خلاصه و کاربردی گفتم که هر مدل چیه و کجا استفاده میشه.
پیشنهاد میکنم اسلاید آخر رو از دست ندی، همه چیزو یکجا خلاصه کرده!
#یادگیری_عمیق #هوش_مصنوعی #یادگیری_ماشین #transformer #cnn #rnn #gan #deep_learning
🔥Five AI articles that you really have to read!
پنج مقاله AI که واقعاً در ۲۰۲۵ باید بخوانی!
از کشف علمی مستقل تا ژنتیک و الگوریتمهای مولد پیشرفته
✔️ اگر دنبال پیشرفتهای واقعی در AI هستی، این اسلایدها رو از دست نده!
✔️ هر مقاله دیدی به مسیر آیندهی AI اشاره میکنه — از تحقیق تا مهندسی.
لینک دانلود مقالات:
1: https://arxiv.org/abs/2503.08979
2: https://arxiv.org/abs/2408.06292
3: https://arxiv.org/abs/2506.13131
4: https://www.biorxiv.org/content/10.1101/2025.06.25.661532v1
5: https://arxiv.org/abs/2506.17298
#هوش_مصنوعی #AI #ArtificialIntelligence #LLM #DeepLearning #AIResearch #Papers2025
@learnpythonicy