K txhais li cas pawg hauv Python?
K txhais li cas pawg hauv Python?

Video: K txhais li cas pawg hauv Python?

Video: K txhais li cas pawg hauv Python?
Video: Data Science with Python! Extracting Metadata from Images 2024, Kaum ib hlis
Anonim

K - txhais tau tias Clustering hauv Python . K - txhais tau tias kev sib koom ua ke yog a pawg algorithm uas aims muab faib n kev soj ntsuam rau hauv k pawg . Muaj 3 kauj ruam: Initialization – K pib “ txhais tau tias ” (centroids) yog tsim los ntawm random. Txoj haujlwm – K pawg yog tsim los ntawm kev koom nrog txhua qhov kev soj ntsuam nrog qhov ze tshaj plaws centroid.

Hais txog qhov no, dab tsi yog pawg hauv Python?

Nco ntsoov ua tib zoo saib ntawm Peb Txoj Kev Kawm Unsupervised hauv Python chav kawm. Ua pawg yog txoj hauj lwm ntawm kev sib koom ua ke ib pawg ntawm cov khoom nyob rau hauv ib txoj kev uas cov khoom nyob rau hauv tib yam pawg zoo sib xws ntau dua li cov khoom hauv lwm yam pawg . Lub centroid yog cov ntaub ntawv taw qhia (xav txog lossis tiag) ntawm qhov chaw ntawm a pawg.

Ib yam li ntawd, qhov qhab nias K txhais li cas? K - txhais tau tias yog ib qho yooj yim unsupervised tshuab kev kawm algorithm uas pab pawg cov ntaub ntawv mus rau hauv ib tug tshwj xeeb naj npawb ( k ) ntawm pawg. Txoj kev luj tshib khiav k - txhais tau tias clustering ntawm dataset rau ib tug ntau yam ntawm cov nqi rau k (hais los ntawm 1-10) thiab tom qab ntawd rau txhua tus nqi ntawm k suav qhov nruab nrab qhab nias rau txhua pawg.

Ib yam li ntawd, K txhais tau hais tias pawg qhia koj li cas?

K - txhais tau hais tias pawg yog ib qho ntawm qhov yooj yim tshaj plaws thiab nrov unsupervised tshuab kawm algorithms. Hauv lwm lo lus, lub K - txhais tau tias algorithm txheeb xyuas k tus naj npawb ntawm centroids, thiab tom qab ntawd faib txhua cov ntaub ntawv taw qhia mus rau qhov ze tshaj plaws pawg , thaum khaws cov centroids me me li sai tau.

N_init hauv K txhais li cas?

Ntau tshaj ntawm iterations ntawm lub k - txhais tau tias algorithm rau ib tug khiav. n_ ib : int, default: 10. Number of time the k - txhais tau tias algorithm yuav khiav nrog txawv centroid noob.

Pom zoo: