Matplotlib Explained in Hindi: AI ?????? ML ?????? ????????? Visualizations ???????????? ???????????????
Matplotlib ?????? ??????????????????????????? ?????? ?????????-??????????????? Python ??????????????????????????? ??????, ?????? Artificial Intelligence (AI) ?????? Machine Learning (ML) ????????? ???????????? ?????????????????????????????????????????? ?????? ????????? ?????????????????? ????????? ?????? ??????????????? ?????? ???????????? ????????? ?????? ??????????????????????????? ???????????? ?????? ?????????????????????, ?????????????????????, ?????? ????????????????????? ?????? ????????? ????????? ??????????????? ????????? ?????? ???????????????????????? ???????????? ?????? ?????????????????? ???????????? ??????, ?????? ML ?????????????????? ?????? ?????????????????????????????? ?????? ??????????????? ?????? ???????????? ???????????????????????? ?????? ???????????????????????? ???????????? ?????? ????????? ?????????????????? ????????? ?????? ??????????????? ?????????, ?????? Matplotlib ?????? ??????????????? ?????? ?????????????????????????????? ????????????????????????????????? ?????? ??????????????? ??????????????????????????? ??????????????????, ???????????? ???????????? ?????????????????????, ?????????????????? ?????????????????????, ???????????????????????????????????????, ?????? ???????????????????????????????????????
?????? ??????????????? ?????? ???????????????????????? ???????????????????????? ?????? ?????????????????????????????? ????????????????????? ?????? Matplotlib ?????? ?????????????????? ????????????????????????????????? ?????????????????? ??????, ?????? AI/ML ????????????????????????????????? ????????? ???????????? ?????????????????????????????????????????? ?????? ???????????? ???????????? ???????????? ?????? ?????? ??????????????????????????? ?????? ????????? ????????????????????????????????????, AI/ML ????????? ???????????? ???????????? ?????????, ?????? ?????????????????????????????? ??????????????? ?????? ????????? ????????? ?????????????????????
Matplotlib ???????????? ??????? - What is Matplotlib in Hindi?
Matplotlib ?????? Python ??????????????????????????? ??????, ?????? 2D ?????? 3D ???????????????????????? ?????? ????????? ????????????????????? ?????? ?????? ????????? ????????? 2003 ????????? John D. Hunter ?????? ??????????????? ???????????? ??????, ?????? ?????? ???????????? ??????????????? ?????? ML ??????????????????????????? ????????? ???????????? ?????????????????????????????????????????? ?????? ????????? ???????????? ?????????????????? ??????????????? ????????? ?????? ?????? ?????????
Matplotlib ?????? ?????????????????? ?????? ?????? ?????? ?????? ???????????? ?????? ????????????????????????????????? ???????????? ?????? ????????? ?????? ????????? ?????? ????????????????????? (???????????? ????????????, ??????????????????, ?????????, ?????????????????????????????????) ?????????????????? ???????????? ??????, ?????? ????????? Pandas ?????? NumPy ?????? ????????? ??????????????? ?????? ??????????????????????????? ???????????? ?????? ???????????? ?????????
Matplotlib ?????? ?????????????????? ??????????????????:
- ???????????????????????? ?????????????????????: ????????????, ??????????????????, ?????????, ?????????????????????????????????, ?????? 3D ????????????????????????
- ????????????????????????????????????: ???????????????, ??????????????????, ?????? ???????????????????????? ?????? ??????????????????????????? ???????????? ?????? ?????????????????????
- ??????????????????????????????: NumPy ?????? Pandas ???????????? ????????????????????????????????? ?????? ????????? ???????????? ?????????????????????????????????
- ???????????????????????????-????????????????????????: ??????????????????????????? ?????? ?????????-???????????????????????? ???????????????????????????????????????????????????
AI/ML ????????? ???????????? ?????????: Matplotlib ?????? ??????????????? ML ?????????????????? ?????? ?????????????????????????????? (???????????? ????????? ??????????????????), ???????????? ??????????????????????????????????????????, ?????? ???????????? ????????????????????????????????? ?????? ????????????????????????????????? ???????????? ?????? ????????? ???????????? ?????????
Matplotlib ??????????????? - Matplotlib Setup in Hindi
Matplotlib ?????? ????????? AI/ML ????????? ?????????????????????????????????????????? ???????????? ???????????? ?????? ????????? ???????????? ???????????? ????????? ????????????????????? ???????????? ?????????????????? ?????????
1. Matplotlib ?????????????????????????????? - Installation
-
???????????????: ????????????????????? ?????? ??????????????? ??????????????????????????? ????????? ?????????????????????????????? ??????????????? ?????? ????????????:
pip install matplotlib
-
??????????????????????????????: Python ????????? Matplotlib ????????????????????? ???????????? ????????? ????????????:
import matplotlib
print("Matplotlib Version:", matplotlib.__version__)
??????????????????:
Matplotlib Version: 3.7.1
2. ????????????????????????????????? ??????????????? - Environment Setup
- Jupyter Notebook: Matplotlib ?????? ????????? ???????????? ?????????????????????????????????????????? ?????? ????????? ???????????????, ????????????????????? ?????? ?????????????????? ????????????????????? ?????????????????? ???????????? ?????????
- Anaconda: Matplotlib ????????????-??????????????????????????? ????????? ?????????
- VS Code: Matplotlib ????????? ??????????????? ?????? ??????????????? ???????????? ?????? ????????? ????????????????????????
AI/ML ????????? ????????????: Matplotlib ?????? ???????????? ???????????? ?????????????????????????????????????????? ?????? ???????????? ?????????????????????????????? ?????? ????????????????????????????????? ???????????? ????????? ???????????? ?????????
????????? ??????????????????????????????: Jupyter Notebook ????????? ?????????????????? ???????????????????????? ??????????????????
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot([1, 2, 3], [4, 5, 6])
plt.title("Simple Plot")
plt.show()
Matplotlib ?????? ??????????????? ????????????????????????????????? - Basic Concepts of Matplotlib
1. ???????????? ????????????????????? - Line Plots
???????????? ????????????????????? ???????????? ???????????????????????? ?????? ?????????????????? ?????? ????????? ?????????????????? ?????????, ???????????? ML ?????????????????? ?????? ???????????????????????? ????????????
????????? ??????????????????????????????: ???????????? ??????????????? ??????????????????
import matplotlib.pyplot as plt
import numpy as np
# Data
epochs = np.array([1, 2, 3, 4, 5])
loss = np.array([0.9, 0.7, 0.5, 0.3, 0.2])
# Line plot
plt.plot(epochs, loss, label="Training Loss", color="blue", marker="o")
plt.title("Training Loss Over Epochs")
plt.xlabel("Epochs")
plt.ylabel("Loss")
plt.legend()
plt.grid(True)
plt.show()
AI/ML ????????? ????????????: ???????????? ????????????????????? ?????? ???????????? ML ?????????????????? ?????? ???????????????????????? ?????? ???????????????????????? ????????? ?????? ??????????????? ???????????? ?????? ????????? ???????????? ?????????
2. ?????????????????? ????????????????????? - Scatter Plots
?????????????????? ????????????????????? ???????????? ????????????????????? ?????? ????????? ????????????????????????????????? ?????? ?????????????????? ?????? ????????? ?????????????????? ?????????, ???????????? ???????????? ????????????????????????????????????
????????? ??????????????????????????????: ?????????????????? ??????????????? ??????????????????
import matplotlib.pyplot as plt
import numpy as np
# Data
feature1 = np.array([1.5, 2.3, 3.1, 4.7, 5.2])
feature2 = np.array([2.0, 3.5, 4.1, 5.0, 6.0])
# Scatter Plot
plt.scatter(feature1, feature2, color="red", marker="^")
plt.title("Feature1 vs Feature2")
plt.xlabel("Feature1")
plt.ylabel("Feature2")
plt.grid(True)
plt.show()
AI/ML ????????? ????????????: ?????????????????? ????????????????????? ?????? ???????????? ???????????? ?????????????????? ?????? ????????? ???????????????????????? ???????????????????????? ?????? ????????? ???????????? ?????????
3. ??????????????????????????????????????? - Histograms
??????????????????????????????????????? ???????????? ?????????????????????????????????????????? ?????? ??????????????? ?????? ????????? ?????????????????? ?????????, ???????????? ML ??????????????????????????? ????????? ???????????????????????? ?????? ????????????????????????????????????
????????? ??????????????????????????????: ????????????????????????????????? ??????????????????
import matplotlib.pyplot as plt
import numpy as np
# Data
data = np.array([85, 90, 78, 92, 88, 76, 95, 89])
# Histogram
plt.hist(data, bins=5, color="green", edgecolor="black")
plt.title("Data Distribution")
plt.xlabel("Values")
plt.ylabel("Frequency")
plt.show()
AI/ML ????????? ????????????: ??????????????????????????????????????? ?????? ???????????? ??????????????????????????? ?????? ?????????????????????????????????????????? (???????????? ???????????? ????????????????????????) ?????? ???????????????????????? ???????????? ?????? ????????? ???????????? ?????????
4. ???????????????????????????????????? - Customization
Matplotlib ????????????????????? ?????? ??????????????????????????? ???????????? ?????? ????????? ?????? ????????????????????? ???????????? ??????, ???????????? ???????????????, ??????????????????, ?????? ???????????????????????????
????????? ??????????????????????????????: ????????????????????????????????? ??????????????????
import matplotlib.pyplot as plt
import numpy as np
# ????????????
x = np.array([1, 2, 3, 4])
y1 = np.array([10, 20, 25, 30])
y2 = np.array([15, 25, 20, 35])
# Customized plot
plt.plot(x, y1, label="Model1", color="blue", linestyle="--", marker="o")
plt.plot(x, y2, label="Model2", color="orange", linestyle="-", marker="s")
plt.title("Model Comparison", fontsize=14)
plt.xlabel("X-Axis", fontsize=12)
plt.ylabel("Y-Axis", fontsize=12)
plt.legend()
plt.grid(True)
plt.show()
AI/ML ????????? ????????????: ???????????????????????????????????? ?????? ???????????? ??????????????????????????? ?????? ?????????????????? ???????????????????????????????????????????????? ??????????????? ?????? ????????? ???????????? ??????, ???????????? ???????????? ?????????????????????????????? ?????? ??????????????????
AI ?????? ML ????????? Matplotlib ?????? ??????????????? - Advantages of Matplotlib in AI & ML
- ??????????????????????????????: ?????? ????????? ?????? ????????????????????? (????????????, ??????????????????, ?????????????????????????????????) ?????? ?????????????????? ???????????? ?????????
- ????????????????????????????????????: ????????????????????? ?????? ??????????????????????????? ????????? ???????????? ?????? ????????? ?????? ????????????????????????
- ??????????????????????????????: NumPy ?????? Pandas ?????? ????????? ??????????????? ?????? ????????? ???????????? ?????????
- ???????????????????????????-????????????????????????: ?????????-???????????????????????? ????????????????????? ?????? ?????????????????? ?????? ??????????????????????????????????????? ?????? ????????? ????????????????????? ????????????
AI ?????? ML ????????? Matplotlib ?????? ???????????? ????????? - Use Cases of Matplotlib in AI & ML in Hindi
- ???????????? ??????????????????????????????????????????: ??????????????????????????? ?????? ?????????????????????????????????????????? ?????? ??????????????????????????????????????? ?????? ???????????????????????? ???????????????
- ???????????? ??????????????????????????????: ???????????????????????? ?????? ???????????????????????? ????????? ?????? ???????????? ????????????????????? ?????? ??????????????? ???????????????
- ???????????? ?????????????????????????????????: ?????????????????? ????????????????????? ?????? ?????????????????? ?????? ????????? ???????????????????????? ??????????????????
- ??????????????????????????????: ????????????????????? ?????????????????? ?????? ?????????????????????????????? ?????? ?????? ??????????????? ????????? ??????????????? ???????????????
???????????? ??????????????????????????? ??????????????????: ?????? ????????????????????? ?????? ?????????????????????????????????????????? ?????? ????????????????????????????????? ????????? ????????????????????????????????? ???????????? ?????? ??????????????????????????? ??????????????????
# Mini Project: Data Distribution Visualization
import matplotlib.pyplot as plt
import numpy as np
# Dataset
data = np.array([85, 90, 78, 92, 88, 76, 95, 89, 84, 91])
# Histogram
plt.hist(data, bins=5, color="purple", edgecolor="black")
plt.title("Dataset Distribution")
plt.xlabel("Values")
plt.ylabel("Frequency")
plt.show()
Matplotlib ????????? ??????????????? ????????????????????????????????? - Best Practices in Matplotlib in Hindi
- ?????????????????? ?????????????????????: ????????????????????? ????????? ???????????????, ?????????????????? ??????????????????, ?????? ?????????????????? ?????????????????????
- ????????????????????????????????????: ??????????????????????????? ????????? ?????? ????????? ??????????????? ?????? ???????????????????????? ???????????? ???????????????
- ???????????????????????????????????????: ????????? ????????? ????????????????????? ?????? ??????????????????????????????????????? ??????????????? ?????????????????????
- ???????????????????????????: Kaggle ??????????????????????????? ?????? Matplotlib ?????? ????????? ?????????????????????????????????????????? ????????????????????????????????? ???????????????
???????????????????????? - Conclusion
Matplotlib ?????? ??????????????????????????? ??????????????????????????? ?????? ?????? AI ?????? ML ????????? ???????????? ?????????????????????????????????????????? ?????? ???????????? ?????? ????????????????????? ??????????????? ????????? ?????? ??????????????? ????????? ???????????? Matplotlib ?????? ??????????????? ????????????????????????????????? ???????????? ???????????? ?????????????????????, ?????????????????? ?????????????????????, ???????????????????????????????????????, ?????? ???????????????????????????????????? ?????? ??????????????? ??????????????????????????? ????????????, ????????? ?????? AI/ML ????????? ???????????? ???????????? ????????? ?????? ?????? ????????? ???????????????
???????????? ????????????????????? ????????? ?????? Scikit-learn, TensorFlow, ?????? ???????????? AI/ML ?????????????????????????????? ?????? ??????????????? ??????????????????????????? ??????????????????, ?????? ?????????????????????????????? ????????????????????????????????? ?????? ??????????????????????????? ??????????????????????????? ???????????? ???????????? ?????? ???????????? AI/ML ????????????????????????????????? ????????? Matplotlib ?????? ??????????????? ????????????!
Also Read:??