????(ML)? ???? ?????? ???? ???? ??? ?? ? ?? ??? ??? ?????. ??? ?? ?? ??? ??? ?? ????. ??? ??? ??? ??? ?? ?? ??? ?????. ?? ???? ? ?? ??? ?? ??? ??? ?????. ? ????? ?? ?? ???? ????, ?? ??? ????, ?? ??? ???? ?? ??? ???? ? ??? ????.
?? ???? ??????
?? ??? ????? ???? ??? ?????? ???? ??? ?? ?????. ?, ??? ???? ????? ?? ??? ??? ??(???)? ?????. ??? ??? ??? ?? ??? ??? ???? ??? ?? ??? ???? ?? ??? ??? ? ? ??? ?? ????.
?? ??? ?? ??
??? ?? ??:
- ??: ??? ???.
- ??: ???? "??"?? "?? ??"?? ???? ?????.
- ??? ??? ??? ?? ???? ???? ???? ??? ?????.
?? ??:
- ??: ?? ??(?: ??, ?? ?, ??)
- ??: ??.
- ??? ?? ???? ???? ??? ???? ??? ?????.
??? ??:
- ??: ?? ???(?: ??, ??? ??)
- ??: ??(?: "??" ?? "???")
- ??? ???? ?? ??? ???? ???? ??? ?????.
??? ???? ??????
??? ??? ????? ???? ???? ?? ?????? ???? ??? ?? ?????. ?? ??? ?? ??? ??? ???? ????. ?? ??? ??? ????? ??, ?? ?? ??? ???? ?????.
??? ??? ?? ??
?? ???:
- ??: ?? ???(?: ??, ?? ??, ??)
- ??: ?? ?? ??(?: '??? ???', '?? ???')
- ? ??? ??? ??? ??? ?? ??? ?????.
?? ??:
- ??: ???? ??? ???.
- ??: ??? ??? ??? ? ?? ????? ??? ?????.
- ??? ????? ????? ???? ?????.
???? ??:
- ??: ???? ?? ???.
- ??: ?? ?? ???? ?? ??(?: '?? ??')
- ??? ?? ?? ???? ?????.
?? ??? ??? ??? ?? ???
**方面** | **監(jiān)督學(xué)習(xí)** | **無監(jiān)督學(xué)習(xí)** |
---|---|---|
**數(shù)據(jù)** | 標(biāo)記的(提供輸入和輸出) | 未標(biāo)記的(僅提供輸入) |
**目標(biāo)** | 預(yù)測結(jié)果或?qū)?shù)據(jù)進(jìn)行分類 | 發(fā)現(xiàn)數(shù)據(jù)中的模式或結(jié)構(gòu) |
**示例** | 分類、回歸 | 聚類、降維 |
**復(fù)雜性** | 更容易評(píng)估(已知輸出) | 更難評(píng)估(沒有基本事實(shí)) |
**用例** | 垃圾郵件檢測、價(jià)格預(yù)測 | 客戶細(xì)分、異常檢測 |
?? ??
? ?? ??? ??? ???? ?? ??? ??? ??? ??? ??? ????? ???????. ??? Python? ???? Scikit-learn ?????? ??? ????.
?? ?? ??: ?? ?? ??
??? ?? ?? ??? ???? ??? ?? ??? ???? ?? ??? ???????.
# 導(dǎo)入庫 import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_squared_error # 創(chuàng)建樣本數(shù)據(jù)集 data = { 'SquareFootage': [1400, 1600, 1700, 1875, 1100, 1550, 2350, 2450, 1425, 1700], 'Price': [245000, 312000, 279000, 308000, 199000, 219000, 405000, 324000, 319000, 255000] } df = pd.DataFrame(data) # 特征 (X) 和標(biāo)簽 (y) X = df[['SquareFootage']] y = df['Price'] # 將數(shù)據(jù)分成訓(xùn)練集和測試集 X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) # 訓(xùn)練線性回歸模型 model = LinearRegression() model.fit(X_train, y_train) # 做出預(yù)測 y_pred = model.predict(X_test) # 評(píng)估模型 mse = mean_squared_error(y_test, y_pred) print(f"均方誤差:{mse:.2f}")
??? ??? ?: ?? ???
K-?? ????? ????? ???? ??? ??? ?? ??? ???? ??? ??????.
# 導(dǎo)入庫 import numpy as np import pandas as pd from sklearn.cluster import KMeans import matplotlib.pyplot as plt # 創(chuàng)建樣本數(shù)據(jù)集 data = { 'Age': [25, 34, 22, 45, 32, 38, 41, 29, 35, 27], 'SpendingScore': [30, 85, 20, 90, 50, 75, 80, 40, 60, 55] } df = pd.DataFrame(data) # 特征 (X) X = df[['Age', 'SpendingScore']] # 訓(xùn)練 K 均值聚類模型 kmeans = KMeans(n_clusters=3, random_state=42) df['Cluster'] = kmeans.fit_predict(X) # 可視化集群 plt.scatter(df['Age'], df['SpendingScore'], c=df['Cluster'], cmap='viridis') plt.xlabel('年齡') plt.ylabel('消費(fèi)評(píng)分') plt.title('客戶細(xì)分') plt.show()
?? ??? ??? ??? ???? ?? ??
?? ??? ???? ??:
- ???? ??? ??????.
- ??? ????? ???? ???? ????.
- ?: ?? ??, ??? ??, ?? ??.
??? ??? ???? ??:
- ???? ???? ?? ???? ????.
- ??? ???? ??? ???? ????.
- ?: ??? ?????, ??? ??? ???, ?? ??? ????.
??
?? ??? ??? ??? ????? ? ?? ?? ????, ?? ??? ??? ?? ??? ????. ?? ??? ???? ??? ???? ?? ? ???? ? ????, ??? ??? ???? ???? ?? ????? ??? ???? ????? ??? ?????.
???? ???? ? ??? ?? ?? ?? ?? ??? ?? ?????? ???? ?? ?? ??? ??? ???. ??? ??? ??? ??? ???? ??? ??? ??? ?????.
? ??? ??? ???? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











Python? Unittest ? Pytest? ??? ? ???? ??, ?? ? ??? ????? ? ?? ?? ???? ??? ??? ?????. 1. ??? ??? ?? ??? ???? ??? ??? ??? ?????. UnitTest? ??? ??? ???? ???? Test \ _? ???? ???? ?????. Pytest? ? ?????. Test \ _?? ???? ?? ? ??????. 2. ??? ?? ?? ? ?? ? ??? ??? ????. UnitTest? Assertequal, AssertTrue ? ?? ??? ???? ?? Pytest? ??? Assert ?? ???? ?? ?? ??? ???? ?????. 3. ?? ??? ?? ? ?? ????? ????? ????.

Python? ?? ?? ??? ?? ? ???? ??????. ?? ??? ?? (? : ?? ?? ??)? ?? ?? ??? ???? ?? ??? ?? ??? ??? ? ????. ?? ??, ? ??? ?? ?? ??? ???? ??? ?? ?? ??? ?? ? ??? ???? ?? ??? ??? ??????. ? ???? ?? ??? ??? ????. 1. ?? ?? ?? ??? ?? ??? ??; 2. ?? ?? ??? ?? ??? ??? ?? ???? ???? ??????. 3. ??? ??? ???? ????? ???. 4. ???? ?? ? ???? ????? ????. ??? ??? ?? ?? ??? ???? ???? ???? my_list = [] ?? my_list = none? ???? ?? ?? ?? ??? ? ??? ??? ???? ??? ????.

Python? ??, ?? ? ?? ??? ??? ??? ?? ?? ??? ? ?? ???? ??????. ??? ?? ?? ??? ?? ?? ??? ??? ?? ?? ?? ???? ???? ? ?? ? ?? ??? ????? ? ?????. 1. [x2forxinRange (10)]? ?? ?? ??? ?? ???? ?? ?? ? ? ????. 2. {x : x2forxinrange (5)}? ?? ?? ???? ? ? ??? ???? ?????. 3. [xforxinnumbersifx%2 == 0]? ?? ??? ???? ??? ????? ????? ????. 4. ??? ??? ?? ?? ?? ??? ?? 3 ? ???? ???? ?? ?? ?? ? ???. ??? ?? ?? ???? ???? ??? ?? ?? ??? ??? ??????. ??? ???? ??? ?? ? ? ????

Python? ???? ??? ????? ?? ?? ? ???? ? ?????. ??? ? ???? ????? ???? ????? ???? ?????. 1. ?? API ? ?? ???? (? : HTTP, REST, GRPC)? ???? Python? Flask ? Fastapi? ?? ??? ??? ?? API? ???? ?? ?? HTTPX? ???? ?? ?? ???? ?????. 2. ??? ??? (Kafka, Rabbitmq, Redis)? ???? ??? ??? ???? Python Services? ?? ?? ???? ?? ? ???? ???? ??? ?? ?? ?, ?? ? ? ?? ??? ?? ? ? ????. 3. ??? ???? ?? C/C? ?? ?? ?? ??? (? : Jython)? ?? ?? ??

pythonisidealfordataanalysisduetonumpyandpandas.1) numpyexcelsatnumericalcomputationsfast, multi-dimensionalArraysandectorizedOferationsLikenp.sqrt ()

?? ????? (DP)? ??? ??? ? ??? ?? ??? ??? ??? ? ??? ??? ?? ??? ???? ??? ????? ??????. ? ?? ?? ??? ????. 1. ??? (??) : ??? ?? ??? ???? ??? ???? ?? ??? ??????. 2. ??? (?) : ?? ???? ???? ????? ?????. ???? ???, ?? ?? ?? ?? ??/?? ?, ??? ??? ?? ?? ?? ??? ??? ????? ?????. ?????? ????? ?? ???? ?? ??? ? ???, ?? ??? ???? ?? ?? ??? ???? ??? ???? ????? ???? ???????.

??? ?? ???? ????? ????? __iter_ ? __next__ ???? ???????. ① __iter__ ???? ??? ? ?? ??? ???? ??? ?? ?? ??? ?????. ② __next__ ???? ? ??? ?? ????, ?? ??? ??? ????, ? ?? ??? ??? stopiteration ??? ??????. status ??? ???? ??????? ?? ??? ??? ?? ?? ??? ???????. pile ?? ?? ???? ?? ??? ?? ? ??? ?? ? ??? ?????? ?????. simple ??? ??? ?? ?? ??? ?? ???? ???? ?? ??? ? ??? ?? ????? ???? ??? ??? ???????.

Python? ?? ???? ?? ???, ?? ?? ????, ?? ???? ?? ? AI/ML ??? ???? ??? ?????. ??, Cpython? ???? ????? ?? ??, ?? ?? ??? ? ?? ? ?? ??? ?? ??? ??????. ??, ??? ????? ?? ?? ? ?? ??? ????? ?? ?? ? ? ??? ?? ?????. ??, Pyscript ? Nuitka? ?? ?? ???? ??? ??? ?? ??? ?????. ?????, AI ? ??? ?? ??? ?? ???? ??? ?? ???????? ???? ?? ? ??? ?????. ??? ??? Python? ??? ??? ????? ???? ?? ??? ???? ??? ?????.
