AI ?????? ML ?????? ????????? NumPy: ???????????????????????? ?????? ????????? ????????????
NumPy (Numerical Python) ?????? ??????????????????????????? Python ??????????????????????????? ??????, ?????? Artificial Intelligence (AI) ?????? Machine Learning (ML) ????????? ???????????? ?????????????????????????????? ?????? ??????????????????????????? ????????????????????????????????? ?????? ????????? ?????????????????? ????????? ?????? ??????????????? ?????? ???????????? ????????? NumPy ?????? ?????????????????? ?????? ?????? ?????? ?????? ?????????-?????????????????????????????? arrays ?????? ??????????????????????????? ???????????????????????? ?????? ?????????????????? ???????????? ??????, ?????? ML ?????????????????? ????????? ???????????? ?????????????????????????????? ?????? ????????????????????????????????? ?????? ????????? ?????????????????? ???????????? ?????? ??????????????? ?????????, ?????? NumPy ?????? ??????????????? ?????? ?????????????????????????????? ????????????????????????????????? ?????? ??????????????? ??????????????????????????? ??????????????????, ???????????? arrays, ??????????????????????????? ????????????????????????, ???????????????????????????????????????, ?????? ?????????????????? ???????????????????????????
?????? ??????????????? ?????? ???????????????????????? ???????????????????????? ?????? ?????????????????????????????? ????????????????????? ?????? NumPy ?????? ?????????????????? ????????????????????????????????? ?????????????????? ??????, ?????? AI/ML ????????????????????????????????? ?????? ???????????? ???????????? ???????????? ?????? ?????? ??????????????????????????? ?????? ????????? ????????????????????????????????????, AI/ML ????????? ???????????? ???????????? ?????????, ?????? ?????????????????????????????? ??????????????? ?????? ????????? ????????? ?????????????????????
NumPy ???????????? ??????? - What is NumPy in Hindi?
NumPy ?????? ?????????-??????????????? Python ??????????????????????????? ??????, ?????? ?????????????????????????????? ?????? ??????????????????????????? ???????????????????????? ?????? ????????? ????????????????????? ?????? ?????? ????????? ?????? AI ?????? ML ????????? ??????????????? ????????? ?????? ?????????????????? ?????? ????????????????????? ?????? ???????????? ?????? ??????????????????-???????????????????????? arrays ?????????????????? ???????????? ??????, ?????? ???????????? ?????????????????????????????? ?????? ???????????? ???????????????????????? ????????? ?????????????????????????????? ???????????? NumPy ?????? 2005 ????????? ????????????????????? ????????????????????? ?????? ??????????????? ???????????? ??????, ?????? ?????? ???????????? ??????????????? ??????????????????????????? ????????? ???????????? ?????????????????? ?????????????????????????????? ????????? ?????? ?????? ?????????
NumPy ?????? ?????????????????? ??????????????????:
- NDArray: ???????????????-??????????????????????????? arrays ?????? ???????????? ????????????????????????????????? ?????? ?????????????????? ???????????? ????????????
- ??????????????????????????? ????????????????????????: ????????????, ??????????????????, ??????????????????????????? ???????????????????????? ???????????? ???????????????????????????
- ???????????????????????????????????????: ?????????-????????? ??????????????? ?????? arrays ?????? ???????????????????????? ???????????? ?????? ?????????????????????
- ??????????????????????????????: Pandas, Matplotlib, ?????? Scikit-learn ???????????? ?????????????????????????????? ?????? ????????? ???????????? ?????????????????????????????????
AI/ML ????????? ???????????? ?????????: NumPy ?????? ??????????????? ???????????? ?????????????????????????????????????????? (???????????? ???????????? ????????????????????????), ??????????????????????????? ???????????????????????? (???????????? ????????? ????????????????????????), ?????? ????????? ????????????????????? ????????? ??????????????? ???????????????????????? ?????? ????????? ???????????? ?????????
NumPy ??????????????? - NumPy Setup in Hindi
NumPy ?????? ????????? AI/ML ???????????? ???????????? ?????? ????????? ???????????? ???????????? ????????? ????????????????????? ???????????? ?????????????????? ?????????
1. NumPy ?????????????????????????????? - Installation
-
???????????????: ????????????????????? ?????? ??????????????? ??????????????????????????? ????????? ?????????????????????????????? ??????????????? ?????? ????????????:
pip install numpy
-
??????????????????????????????: Python ????????? NumPy ????????????????????? ???????????? ????????? ????????????:
import numpy as np
print("NumPy Version:", np.__version__)
??????????????????:
NumPy Version: 1.23.5
2. ????????????????????????????????? ??????????????? - Environment Setup
- Jupyter Notebook: NumPy ?????? ????????? ???????????? ???????????????????????? ?????? ?????????????????????????????????????????? ?????? ????????? ??????????????????
- Anaconda: NumPy ????????????-??????????????????????????? ????????? ?????????
- VS Code: NumPy ????????? ??????????????? ?????? ????????? ????????????????????????
AI/ML ????????? ????????????: NumPy ?????? ???????????? ???????????? ?????????????????????????????????????????? ?????? ML ?????????????????? ?????? ????????? ??????????????????????????? ???????????????????????? ????????? ???????????? ?????????
NumPy ?????? ??????????????? ????????????????????????????????? - Basic Concepts of NumPy in Hindi
1. Arrays - NumPy Arrays
NumPy ?????? ????????? ??????????????????????????? ?????? ndarray (N-dimensional array), ?????? Python ????????????????????? ?????? ?????????????????? ???????????? ?????? ???????????????????????? ????????? Arrays 1D, 2D, ?????? ???????????????-??????????????????????????? ?????? ???????????? ????????????
????????? ??????????????????????????????: 1D ?????? 2D arrays ??????????????????
import numpy as np
# 1D array
features = np.array([1.5, 2.3, 3.1, 4.7])
print("1D Array:", features)
# 2D array (Matrix)
data_matrix = np.array([[1, 2, 3], [4, 5, 6]])
print("2D Array:\n", data_matrix)
??????????????????:
1D Array: [1.5 2.3 3.1 4.7]
2D Array:
[[1 2 3]
[4 5 6]]
AI/ML ????????? ????????????: Arrays ?????? ???????????? ???????????? ???????????????????????? (???????????? ML ???????????????????????????) ?????? ??????????????????????????? (???????????? ?????????????????? ????????????????????? ???????????????) ?????? ??????????????? ???????????? ?????? ????????? ???????????? ?????????
2. ??????????????????????????? ???????????????????????? - Mathematical Operations
NumPy ??????????????????????????? ???????????????????????? ?????? ??????????????? ?????? ???????????? ?????? ????????? ???????????????????????????????????? ????????? ?????? element-wise ???????????????????????? ?????? ??????????????????????????? ???????????????????????? (ufuncs) ?????? ?????????????????? ???????????? ?????????
????????? ??????????????????????????????: Element-wise ???????????????????????????
# Mathematical operations on arrays
features = np.array([1, 2, 3, 4])
scaled_features = features * 2 # Scaling
print("Scaled Features:", scaled_features)
# Universal Functions
squared = np.square(features)
print("Squared Features:", squared)
??????????????????:
Scaled Features: [2 4 6 8]
Squared Features: [ 1 4 9 16]
AI/ML ????????? ????????????: ??????????????????????????? ???????????????????????? ?????? ???????????? ???????????? ????????????????????????, ????????? ?????????????????????????????????, ?????? ??????????????????????????? ?????????????????? ????????? ???????????? ?????????
3. ??????????????????????????????????????? - Broadcasting
??????????????????????????????????????? NumPy ?????? ?????? ????????? ???????????? ??????, ?????? ?????????-????????? ??????????????? ?????? arrays ?????? ???????????????????????? ???????????? ?????? ?????????????????? ???????????? ?????????
????????? ??????????????????????????????: ??????????????????????????????????????? ?????? ???????????????
# Broadcasting with 1D array and scalar
data = np.array([1, 2, 3])
result = data + 10
print("Broadcasted Result:", result)
# with 2D array and 1D array
matrix = np.array([[1, 2, 3], [4, 5, 6]])
vector = np.array([10, 20, 30])
result = matrix + vector
print("Matrix + Vector:\n", result)
??????????????????:
Broadcasted Result: [11 12 13]
Matrix + Vector:
[[11 22 33]
[14 25 36]]
AI/ML ????????? ????????????: ??????????????????????????????????????? ?????? ???????????? ?????????????????? ??????????????????????????? ????????? ??????????????? ?????? ?????????????????? ?????? ??????????????? ???????????? ?????? ????????? ???????????? ?????????
4. ?????????????????? ???????????????????????? - Linear Algebra
NumPy ?????????????????? ???????????????????????? ???????????????????????? ???????????? ????????? ????????????????????????, ??????????????????????????? ???????????????????????????????????????, ?????? ?????????????????? ?????? ?????????????????? ???????????? ?????????
????????? ??????????????????????????????: ??????????????????????????? ???????????????????????????
# Matrix Multiplication
A = np.array([[1, 2], [3, 4]])
B = np.array([[5, 6], [7, 8]])
result = np.dot(A, B)
print("Matrix Multiplication:\n", result)
??????????????????:
Matrix Multiplication:
[[19 22]
[43 50]]
AI/ML ????????? ????????????: ?????????????????? ???????????????????????? ?????? ???????????? ?????????????????? ??????????????????????????? ????????? ????????? ??????????????????????????? ?????? ???????????? ???????????????????????????????????????????????? ?????? ????????? ???????????? ?????????
AI ?????? ML ????????? NumPy ?????? ??????????????? - Advantages of NumPy in AI & ML in Hindi
- ????????? ??????????????????????????????: NumPy C ????????? ???????????? ????????? ??????, ?????? ????????? ???????????? ?????? ???????????????????????? ??????????????? ?????????
- ?????????????????? ???????????????????????????: Arrays Python ????????????????????? ?????? ?????? ?????????????????? ???????????? ???????????? ????????????
- ??????????????????????????????: ???????????? ??????????????????????????????????????????, ???????????? ????????????????????????, ?????? ?????????????????????????????????????????? ?????? ????????? ????????????????????????
- ??????????????????????????????: Pandas ?????? Matplotlib ?????? ????????? ??????????????? ?????? ????????? ???????????? ?????????
AI ?????? ML ????????? NumPy ?????? ???????????? ????????? - Use Cases of NumPy in AI & ML in Hindi
- ???????????? ??????????????????????????????????????????: ??????????????????????????? ?????? ?????????????????????????????? ?????? ??????????????? ???????????????
- ???????????? ????????????????????????: ??????????????????????????? ?????????????????? ?????? ??????????????????????????? ???????????????????????? ?????? ????????????
- ??????????????? ????????????????????????: ????????? ????????????????????? ????????? ??????????????? ?????????????????????????????????
- ???????????? ?????????????????????????????????: ???????????? ???????????????????????????????????????????????? ?????? ????????????????????????????????????
???????????? ??????????????????????????? ??????????????????: ?????? ?????????????????? ????????????????????? ?????? ????????? ?????? ??????????????????????????? ????????????????????? ???????????????????????? ???????????? ?????? ??????????????????????????? ??????????????????
# Mini Project: Dataset Analysis
import numpy as np
# Dataset
data = np.array([85, 90, 78, 92, 88])
mean = np.mean(data)
std_dev = np.std(data)
print("Mean:", mean)
print("Standard Deviation:", std_dev)
??????????????????:
Mean: 86.6
Standard Deviation: 4.96
NumPy ????????? ??????????????? ????????????????????????????????? - Best Practices in NumPy in Hindi
- ???????????????????????????????????????: ??????????????? ?????? ????????? NumPy ?????? ???????????????????????????????????? ???????????????????????? ???????????? ???????????????
- ?????????????????? ???????????????????????????: ???????????? ??????????????????????????? ?????? ????????? views ?????? ???????????? ????????????, ??? ?????? copies???
- ???????????????????????????????????????: ????????? ????????? ????????????????????? ?????? ??????????????????????????????????????? ????????????????????? ??????????????? ???????????? ???????????????
- ???????????????????????????: Kaggle ?????? HackerRank ?????? NumPy ?????????????????????????????? ??????????????? ???????????????
???????????????????????? - Conclusion
NumPy ?????? ??????????????????????????? ??????????????????????????? ?????? ?????? AI ?????? ML ????????? ???????????? ?????????????????????????????? ?????? ??????????????????????????? ????????????????????????????????? ?????? ???????????? ??????????????? ????????? ?????? ??????????????? ????????? ???????????? NumPy ?????? ??????????????? ????????????????????????????????? ???????????? arrays, ??????????????????????????? ????????????????????????, ???????????????????????????????????????, ?????? ?????????????????? ???????????????????????? ?????? ??????????????? ??????????????????????????? ????????????, ????????? ?????? AI/ML ????????? ???????????? ???????????? ????????? ?????? ?????? ????????? ???????????????
???????????? ????????????????????? ????????? ?????? Pandas, Matplotlib, ?????? ???????????? AI/ML ?????????????????????????????? ?????? ??????????????? ??????????????????????????? ??????????????????, ?????? ?????????????????????????????? ????????????????????????????????? ?????? ??????????????????????????? ??????????????????????????? ???????????? ???????????? ?????? ???????????? AI/ML ????????????????????????????????? ????????? NumPy ?????? ??????????????? ????????????!
Also Read:??