คู่มือ Python Data Science
Mar 31 2023
.
- IPython: เหนือกว่า Python ปกติ
- รู้เบื้องต้นเกี่ยวกับ NumPy
- การจัดการข้อมูลด้วย Pandas
- การสร้างภาพด้วย Matplotlib
- เริ่มต้นใช้งานแมชชีนเลิร์นนิง
- การเรียนรู้จากข้อมูล
- การถดถอยเชิงเส้น
- ไร้เดียงสา Bayes
- k-เพื่อนบ้านที่ใกล้ที่สุด
- รู้เบื้องต้นเกี่ยวกับการเรียนรู้ของเครื่องด้วย Scikit-Learn
- การเรียนรู้ของเครื่องในทางปฏิบัติ
- การแลกเปลี่ยนอคติ-ความแปรปรวน
- การประมาณค่าความหนาแน่นของเคอร์เนล
- การวิเคราะห์องค์ประกอบหลัก
- การเรียนรู้ที่หลากหลาย
- การรวมกลุ่ม
- ต้นไม้แห่งการตัดสินใจและป่าสุ่ม
- การเพิ่มประสิทธิภาพตามการไล่ระดับสี
- K-หมายถึงการรวมกลุ่ม
- เชิงลึก: การจำแนกประเภทไร้เดียงสา Bayes
- เชิงลึก: การถดถอยเชิงเส้น
- เชิงลึก: รองรับ Vector Machines
- เชิงลึก: ต้นไม้แห่งการตัดสินใจและป่าแบบสุ่ม
- เชิงลึก: การวิเคราะห์องค์ประกอบหลัก
- เชิงลึก: การเรียนรู้ที่หลากหลาย
- เชิงลึก: k-Mean การจัดกลุ่ม
- ทัวร์ลมกรดของ Python
- สิ่งจำเป็นสำหรับภาษา Python
- IPython: เหนือกว่า Python ปกติ
- นัมปี
- เพิ่มเติมเกี่ยวกับ IPython System Shell
- Matplotlib
- SciPy
- Scikit-เรียนรู้
- การเรียนรู้ของเครื่องด้วย Scikit-Learn
- ทรัพยากรการเรียนรู้ของเครื่องเพิ่มเติม
- การเรียนรู้ของเครื่องเชิงปฏิบัติ: ตัวอย่างง่ายๆ
- บรรณานุกรม
import numpy as np
# create a 1D array
a = np.array([0, 1, 2, 3, 4])
print(a)
import pandas as pd
# create a Pandas DataFrame
data = {'name': ['Alice', 'Bob', 'Charlie', 'David'],
'age': [25, 32, 18, 47],
'gender': ['F', 'M', 'M', 'M']}
df = pd.DataFrame(data)
print(df)
# filter rows based on a condition
df_filtered = df[df['age'] > 30]
print(df_filtered)
# group data by a column and compute statistics
grouped_data = df.groupby('gender')['age'].mean()
print(grouped_data)
import matplotlib.pyplot as plt
import numpy as np
# create some data to plot
x = np.linspace(0, 10, 100)
y = np.sin(x)
# create a line plot
plt.plot(x, y)
plt.title('Sine Wave')
plt.xlabel('x')
plt.ylabel('y')
plt.show()
# create a scatter plot
x = np.random.randn(100)
y = np.random.randn(100)
plt.scatter(x, y)
plt.title('Random Data')
plt.xlabel('x')
plt.ylabel('y')
plt.show()
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
# load the iris dataset
iris = load_iris()
# split the data into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(iris['data'], iris['target'], random_state=0)
# create a K-Nearest Neighbors classifier
knn = KNeighborsClassifier(n_neighbors=1)
# fit the classifier to the training data
knn.fit(X_train, y_train)
# predict the classes of the test data
y_pred = knn.predict(X_test)
# compute the accuracy of the classifier
accuracy = knn.score(X_test, y_test)
print('Accuracy:', accuracy)





































![รายการที่เชื่อมโยงคืออะไร? [ส่วนที่ 1]](https://post.nghiatu.com/assets/images/m/max/724/1*Xokk6XOjWyIGCBujkJsCzQ.jpeg)