Take the First Step to Artificial Intelligence with the Best! | Certified Introduction to AI, Robotics and Data course is now Free

Join Global AI Hub Now!

x

Home Forums Forum: Makine Öğrenmesi’ne Giriş DBSCAN for Supervised Learning Reply To: DBSCAN for Supervised Learning

  • Banu Turkmen

    Member
    September 3, 2021 at 9:19 am

    Selam Muhammet,

    DBSCAN kullandigim bir kod parcasi asagida, 2 parametre girmen yeterli; eps ve min_samples. Ben en son gordugun gibi eps degeri olarak 0.0144 kullanmisim, ayrica bunu hesaplamanin da yontemleri var. Benimki clustering problemi idi, o yuzden her bir clusterda en az kac data olsun parametresini de 10 olarak girmisim benim ornekte toplam 5 cluster vardi.

    from sklearn.cluster import DBSCAN

    m=DBSCAN(eps=0.014473734767694877, min_samples=10)

    #When eps is chosen too small, most data will not be clustered at all (and labeled as -1 for “noise”).

    #When chosen too large, it causes close clusters to be merged into one cluster, and eventually the entire data set to be returned as a single cluste

    m.fit(X)

    dataset[‘dbscan_cluster’]=m.labels_ #boylece yeni feature yaratiyorsun ve cluster ya da class numarasini gorebiliyorsun, sende 0 ya da 1 olacaktir.

    Umarim isine yarar.