1. Trang chủ
  2. » Thể loại khác

PHÂN CỤM VÀ XẾP HẠNG VĂN BẢN LUẬN VĂN THẠC SĨ KHOA HỌC MÁY TÍNH

77 14 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

ĐẠI HỌC ĐÀ NẴNG TRƢỜNG ĐẠI HỌC BÁCH KHOA LÊ TRỌNG HIẾU PHÂN CỤM VÀ XẾP HẠNG VĂN BẢN LUẬN VĂN THẠC SĨ KHOA HỌC MÁY TÍNH ĐÀ NẴNG – 2018 ĐẠI HỌC ĐÀ NẴNG TRƢỜNG ĐẠI HỌC BÁCH KHOA LÊ TRỌNG HIẾU PHÂN CỤM VÀ XẾP HẠNG VĂN BẢN Chuyên ngành: Khoa học máy tính Mã số: 60.48.01 LUẬN VĂN THẠC SĨ Ngƣời hƣớng dẫn khoa học: TS TRƢƠNG NGỌC CHÂU ĐÀ NẴNG – 2018 LỜI CẢM ƠN Lời đầu tiên, tơi xin tỏ lịng biết ơn chân thành đến thầy giáo TS Trương Ngọc Châu, thầy tận tình dẫn dắt, bảo tạo điều kiện tốt để tơi hồn thành luận văn Tôi xin chân thành cảm ơn quý thầy cô công tác trường Đại học Bách Khoa – Đại học Đà Nẵng, người trực tiếp giảng dạy, giúp đỡ tạo điều kiện thuận lợi cho tơi q trình học tập, nghiên cứu hồn thành khóa học Xin chân thành cảm ơn anh chị học viên lớp cao học Khoa học máy tính khóa 33 (2016 - 2018), bạn đồng nghiệp động viên khuyến khích tơi suốt thời gian học tập thực đề tài Mặc dù cố gắng hoàn thành luận văn với tất nỗ lực thân luận văn cịn nhiều thiếu sót Kính mong nhận đóng góp q thầy giáo, giáo bạn bè đồng nghiệp Xin chân thành cảm ơn! LỜI CAM ĐOAN Tơi cam đoan cơng trình nghiên cứu riêng hướng dẫn trực tiếp thầy giáo TS Trương Ngọc Châu Các số liệu, kết nêu luận văn trung thực chưa công bố cơng trình khác Tác giả luận văn Lê Trọng Hiếu PHÂN CỤM VÀ XẾP HẠNG VĂN BẢN Học viên: Lê Trọng Hiếu Chuyên ngành: Khoa học máy tính Mã số: 60.48.01 Khóa: K33 Trƣờng Đại học Bách khoa - ĐHĐN Tóm tắt – Ngày nay, với phát triển vƣợt bậc công nghệ thông tin, số lƣợng tài liệu điện tử ngƣời tạo ngày phong phú đa dạng Cơ sở liệu văn (text database) phát triển nhanh chóng thu hút quan tâm nghiên cứu gia tăng nhanh chóng số lƣợng thơng tin dạng số, ví dụ nhƣ loại tài liệu điện tử, email, thƣ điện tử, trang web…Có thể thấy hầu hết thơng tin phủ, ngành cơng nghiệp, kinh doanh, trƣờng học … đƣợc số hóa lƣu trữ dƣới dạng sở liệu làm cho liệu văn tăng trƣởng nhanh chóng Khai thác văn (text mining) nhánh data mining nhằm tìm kiếm trích xuất thơng tin nằm văn Text mining ngày có nhiều ứng dụng thực tế nhƣ lọc thƣ rác, đối chiếu lý lịch cá nhân, phân tích cảm nghĩ, phân loại tài liệu… Luận văn giới thiệu số kiến thức khai phá liệu, khai phá văn đồng thời nghiên cứu, tìm kiếm, xây dựng giải pháp cài đặt chƣơng trình ứng dụng phân cụm xếp hạng văn Từ khóa – khai phá văn bản; khai phá liệu; phân cụm văn bản; khám phá tri thức; gom nhóm văn CLUTTERING AND RANK TEXT DOCUMENT Abstract - Today, with the rapid development of information technology, the number of man-made electronic documents is becoming more and more diverse Text database is growing rapidly and attracting research attention by the rapid increase in the amount of information in digital form such as electronic documents, emails, letters electronics, websites It is possible to see most of the information of governments, industries, businesses, schools are digitized and stored in the form of databases that make the data literate rapid growth Text mining is a branch of data mining that searches and extracts information in text Text mining has more and more applications in practice such as spam filtering, personal profile matching, sensory analysis, document classification This thesis introduces some basic knowledge about data mining, text mining, research, search, solution building, and application installation can cluttering and rank text Key words – Text mining; Data mining; clusters of documents; exploring knowledge; grouping documents MỤC LỤC MỞ ĐẦU 1 LÝ DO CHỌN ĐỀ TÀI MỤC TIÊU NGHIÊN CỨU ĐỐI TƢỢNG VÀ PHẠM VI NGHIÊN CỨU PHƢƠNG PHÁP NGHIÊN CỨU Ý NGHĨA ĐỀ TÀI NGHIÊN CỨU CẤU TRÚC LUẬN VĂN CHƢƠNG TỔNG QUAN VỀ KHAI PHÁ DỮ LIỆU 1.1 KHAI PHÁ DỮ LIỆU VÀ KHÁM PHÁ TRI THỨC 1.1.1 Khái niệm khai phá liệu 1.1.2 Quá trình khám phá tri thức 1.1.3 Các kỹ thuật khai phá liệu 1.1.4 Các ứng dụng khai phá liệu 1.2 KHAI PHÁ VĂN BẢN 1.2.1 Khái niệm 1.2.2 Các kỹ thuật khai phá văn 1.3 KHAI PHÁ DỮ LIỆU WEB 11 1.3.1 Khai phá liệu web 11 1.3.2 Lợi ích khai phá liệu web 12 1.3.3 Khó khăn 12 1.3.4 Thuận lợi 14 1.3.5 Các kiểu liệu web 14 1.4 CÁC THÁCH THỨC TRONG KHAI PHÁ DỮ LIỆU 15 1.4.1 Các vấn đề Cơ sở liệu 15 1.4.2 Một số vấn đề khác 16 1.5 PHÂN CỤM DỮ LIỆU 17 1.5.1 Giới thiệu toán 17 1.5.2 Một số độ đo 18 1.5.3 Một số phƣơng pháp phân cụm liệu 22 1.5 KẾT LUẬN CHƢƠNG 31 CHƢƠNG PHƢƠNG PHÁP PHÂN CỤM VÀ XẾP HẠNG VĂN BẢN 32 2.1 GIỚI THIỆU BÀI TOÁN 32 2.2 LỰA CHỌN GIẢI PHÁP PHÂN CỤM VÀ XẾP HẠNG 32 2.2.1 Support Vector Machine (SVM) 32 2.2.2 Phƣơng pháp K-Neaest Neighbor (KNN) 34 2.2.3 Phân loại Naïve Bayse (NB) 35 2.2.4 Centroid- based vector 37 2.2.5 Linear Least Square Fit (LLSF) 37 2.2.6 Sử dụng thuật toán K-Means 38 2.3 KẾT LUẬN CHƢƠNG 42 CHƢƠNG THỰC NGHIỆM VÀ ĐÁNH GIÁ 44 3.1 HƢỚNG TIẾP CẬN THỰC NGHIỆM 44 3.2 TIẾN HÀNH THỰC NGHIỆM 45 3.2.1 Môi trƣờng thực nghiệm 45 3.2.2 Thành phần 45 3.2.3 Kết thực nghiệm 45 3.3 ĐÁNH GIÁ KẾT QUẢ 50 3.4 KẾT LUẬN CHƢƠNG 50 KẾT LUẬN 51 DANH MỤC TÀI LIỆU THAM KHẢO PHỤ LỤC QUYẾT ĐỊNH GIAO ĐỀ TÀI LUẬN VĂN (bản sao) DANH MỤC CÁC TỪ VIẾT TẮT CSDL: Cơ sở liệu KDD: Khai phá tri thức (Knowledge Discovery in Databases) KPDL: Khai phá liệu PCDL: Phân cụm liệu DANH MỤC CÁC BẢNG Số hiệu Tên bảng bảng Trang 1.1 Tham số cho hai đối tƣợng liệu x, y 20 2.1 Đặc trƣng đối tƣợng 39 2.2 Kết nhóm đối tƣợng 42 DANH MỤC CÁC HÌNH Số hiệu hình vẽ Tên hình vẽ Trang 1.1 Quá trình khám phá tri thức 1.2 Lân cận P với ngƣỡng Eps 28 1.3 Mật độ - đến đƣợc trực tiếp 28 1.4 Mật độ đến đƣợc 29 1.5 Mật độ liên thông 29 Siêu mặt phẳng h phân chia liệu huấn huyện thành lớp + 2.1 – với khoảng cách biên lớn Các điểm gần h vector hỗ trợ, Support Vector (đƣợc khoanh trịn) 33 2.2 Mơ tả thuật tốn K-means 38 3.1 dowload python 46 3.2 Cài đặt python 46 3.3 Kết thực nghiệm trực quan 49 [16] T Theodosiou, N Darzentas, L Angelis, C A Ouzounis (2008), “PuReD-MCL: a graph-based PubMed document clustering methodology”, Bioinformatic, pp 1935-1941 [17] Van Dongen, S (2000), “Graph Clustering by Flow Simulation”, PhD Thesis, University of Utrecht, The Netherlands [18] Ying Zhao, George Karypis (2002), “Comparison of Agglomerative and Partitional Document Clustering Algorithms”, Department of Computer Science PHỤ LỤC MỘT SỐ ĐOẠN CODE CỦA CHƢƠNG TRÌNH # Load some categories from the training set categories = [ 'alt.atheism', 'talk.religion.misc', 'comp.graphics', 'sci.space', ] # Uncomment the following to the analysis on all the categories # categories = None print("Loading 20 newsgroups dataset for categories:") print(categories) dataset = fetch_20newsgroups(subset='all', categories=categories, shuffle=True, random_state=42) print("%d documents" % len(dataset.data)) print("%d categories" % len(dataset.target_names)) print() labels = dataset.target true_k = np.unique(labels).shape[0] print("Extracting features from the training dataset using a sparse vectorizer") t0 = time() if opts.use_hashing: if opts.use_idf: # Perform an IDF normalization on the output of HashingVectorizer hasher = HashingVectorizer(n_features=opts.n_features, stop_words='english', alternate_sign=False, norm=None, binary=False) vectorizer = make_pipeline(hasher, TfidfTransformer()) else: vectorizer = HashingVectorizer(n_features=opts.n_features, stop_words='english', alternate_sign=False, norm='l2', binary=False) else: vectorizer = TfidfVectorizer(max_df=0.5, max_features=opts.n_features, min_df=2, stop_words='english', use_idf=opts.use_idf) X = vectorizer.fit_transform(dataset.data) print("done in %fs" % (time() - t0)) print("n_samples: %d, n_features: %d" % X.shape) print() if opts.n_components: print("Performing dimensionality reduction using LSA") t0 = time() # Vectorizer results are normalized, which makes KMeans behave as # spherical k-means for better results Since LSA/SVD results are # not normalized, we have to redo the normalization svd = TruncatedSVD(opts.n_components) normalizer = Normalizer(copy=False) lsa = make_pipeline(svd, normalizer) X = lsa.fit_transform(X) print("done in %fs" % (time() - t0)) explained_variance = svd.explained_variance_ratio_.sum() print("Explained variance of the SVD step: {}%".format( int(explained_variance * 100))) print() # Do the actual clustering if opts.minibatch: km = MiniBatchKMeans(n_clusters=true_k, init='k-means++', n_init=1, init_size=1000, batch_size=1000, verbose=opts.verbose) else: km = KMeans(n_clusters=true_k, init='k-means++', max_iter=100, n_init=1, verbose=opts.verbose) print("Clustering sparse data with %s" % km) t0 = time() km.fit(X) print("done in %0.3fs" % (time() - t0)) print() print("Homogeneity: %0.3f" % metrics.homogeneity_score(labels, km.labels_)) print("Completeness: %0.3f" % metrics.completeness_score(labels, km.labels_)) print("V-measure: %0.3f" % metrics.v_measure_score(labels, km.labels_)) print("Adjusted Rand-Index: %.3f" % metrics.adjusted_rand_score(labels, km.labels_)) print("Silhouette Coefficient: %0.3f" % metrics.silhouette_score(X, km.labels_, sample_size=1000)) print() if not opts.use_hashing: print("Top terms per cluster:") if opts.n_components: original_space_centroids = svd.inverse_transform(km.cluster_centers_) order_centroids = original_space_centroids.argsort()[:, ::1] else: order_centroids = km.cluster_centers_.argsort()[:, ::-1] terms = vectorizer.get_feature_names() for i in range(true_k): print("Cluster %d:" % i, end='') for ind in order_centroids[i, :10]: print(' %s' % terms[ind], end='') print()

Ngày đăng: 28/03/2021, 22:59

Xem thêm:

TỪ KHÓA LIÊN QUAN

w