對數據倉庫進行數據建模_確定是否可以對您的數據進行建模

對數據倉庫進行數據建模

Some data sets are just not meant to have the geospatial representation that can be clustered. There is great variance in your features, and theoretically great features as well. But, it doesn’t mean is statistically separable.

某些數據集并不意味著具有可以聚類的地理空間表示。 您的功能差異很大,理論上也很棒。 但是,這并不意味著在統計上是可分離的。

那么,我什么時候停止? (So, WHEN DO I STOP?)

  1. Always Visualize your data based on the class label you are trying to predict

    始終根據您要預測的類標簽可視化數據

columns_pairplot = x_train.select_dtypes(include=['int', 'float']).join(y_train)
sns.pairplot(columns_pairplot, hue = 'readmitted')
plt.show()

The distribution of different classes is almost exact. Of course, it is an imbalanced dataset. But, notice how the spread of the classes overlaps as well?

不同類別的分布幾乎是準確的。 當然,它是一個不平衡的數據集。 但是,注意這些類的傳播也是如何重疊的嗎?

2. Apply the t-SNE visualization

2.應用t-SNE可視化

t-SNE is “t-distributed stochastic neighbor embedding”. It maps higher dimensional data to 2-D space. This approximately preserves the nearness of the samples.

t-SNE是“ t分布隨機鄰居嵌入”。 它將高維數據映射到二維空間。 這大致保持了樣品的接近性。

You might need to apply different learning rates to find the best one for your dataset. Usually, try values between 50 and 200.

您可能需要應用不同的學習率才能為數據集找到最佳學習率 。 通常,請嘗試輸入介于50和200之間的值。

Hyper-parameter, perplexity balances the importance t-SNE gives to local and global variability of the data. It is a guess on the number of close neighbors each point has. Use values between 5–50. Higher, if there are more data points. Perplexity value should not be more than the number of data points.

超參數, 困惑度平衡了t-SNE對數據局部和全局可變性的重要性。 這是對每個點的近鄰數量的猜測。 使用5-50之間的值。 如果有更多數據點,則更高 。 困惑度值不應大于數據點的數量。

NOTE: Axis to t-SNE plot are not interpretable. They will be different every time t-SNE is applied

注意:軸到t-SNE圖是無法解釋的。 每次應用t-SNE時它們都會不同

Image for post
Image by Author: T-SNE Visualization
圖片作者:T-SNE可視化

Hmm, let’s look a bit more- tweak some hyperparameters.

嗯,讓我們再看一下-調整一些超參數。

# reduce dimensionality with t-sne
tsne = TSNE(n_components=2, verbose=1, perplexity=50, n_iter=1000, learning_rate=50)
tsne_results = tsne.fit_transform(x_train)
Image for post
Image by Author: Overlapping Data- Unclassifiable!
圖片作者:重疊數據-無法分類!

Do you see how the clusters can not be separated! I should have stopped here! But, I could not get myself out of the rabid hole. [YES WE ALL GO DOWN THAT SOMETIMES].

您是否看到群集無法分離! 我應該在這里停下來! 但是,我無法擺脫困境。 [是的,我們有時會倒下]。

3. Multi-Class Classification

3.多類別分類

We already know from above that the decision boundaries are non-linear. So, we can use an SVC (Support Vector Classifier with RBF Kernel)

從上面我們已經知道決策邊界是非線性的。 因此,我們可以使用SVC (帶有RBF內核的支持向量分類器)

from sklearn.svm import SVC
from sklearn.model_selection import GridSearchCVsvc_model = SVC() ## default kernel - RBF
parameters = {'C':[0.1, 1, 10], 'gamma':[0.00001, 0.0001, 0.001, 0.01, 0.1]}
searcher = GridSearchCV(svc_model, param_grid = parameters, n_jobs= 4, verbose = 2, return_train_score= True)
searcher.fit(x_train, y_train)
# Report the best parameters and the corresponding score

Train Score: 0.59Test Score: 0.53F1 Score: 0.23Precision Score: 0.24

火車得分:0.59測試得分:0.53F1得分:0.23精度得分:0.24

So, I should have stopped earlier…It is always good to have an understanding of your data before you try to over-tune and complicate the model in the hopes of better results. Good Luck!

因此,我應該早點停下來……在您嘗試過度調整模型并使模型復雜化以期獲得更好的結果之前,最好先了解您的數據。 祝好運!

翻譯自: https://towardsdatascience.com/determine-if-your-data-can-be-modeled-e619d65c13c5

對數據倉庫進行數據建模

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/388332.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/388332.shtml
英文地址,請注明出處:http://en.pswp.cn/news/388332.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

15 并發編程-(IO模型)

一、IO模型介紹 1、阻塞與非阻塞指的是程序的兩種運行狀態 阻塞:遇到IO就發生阻塞,程序一旦遇到阻塞操作就會停在原地,并且立刻釋放CPU資源 非阻塞(就緒態或運行態):沒有遇到IO操作,或者通過某種…

arduino消息服務器,在C(Arduino IDE)中將API鏈接消息解析為服務器(示例代碼)

我正在使用Arduino IDE來編程我的微控制器,它有一個內置的Wi-Fi芯片(ESP8266 NodeMCU),它連接到我的互聯網路由器,然后有一個特定的IP(就像192.168.1.5)。所以我想通過添加到鏈接的消息發送命令(和數據),然后鏈接變為:…

不提拔你,就是因為你只想把工作做好

2019獨角獸企業重金招聘Python工程師標準>>> 我有個朋友,他30出頭,在500強公司做技術經理。他戴無邊眼鏡,穿一身土黃色的夾克,下面是一條常年不洗的牛仔褲加休閑皮鞋,典型技術高手范。 三 年前,…

python內置函數多少個_每個數據科學家都應該知道的10個Python內置函數

python內置函數多少個Python is the number one choice of programming language for many data scientists and analysts. One of the reasons of this choice is that python is relatively easier to learn and use. More importantly, there is a wide variety of third pa…

C#使用TCP/IP與ModBus進行通訊

C#使用TCP/IP與ModBus進行通訊1. ModBus的 Client/Server模型 2. 數據包格式及MBAP header (MODBUS Application Protocol header) 3. 大小端轉換 4. 事務標識和緩沖清理 5. 示例代碼 0. MODBUS MESSAGING ON TCP/IP IMPLEMENTATION GUIDE 下載地址:http://www.modb…

Hadoop HDFS常用命令

1、查看hdfs文件目錄 hadoop fs -ls / 2、上傳文件 hadoop fs -put 文件路徑 目標路徑 在瀏覽器查看:namenodeIP:50070 3、下載文件 hadoop fs -get 文件路徑 保存路徑 4、設置副本數量 -setrep 轉載于:https://www.cnblogs.com/chaofan-/p/9742633.html

SAP UI 搜索分頁技術

搜索分頁技術往往和另一個術語Lazy Loading(懶加載)聯系起來。今天由Jerry首先介紹S/4HANA,CRM Fiori和S4CRM應用里的UI搜索分頁的實現原理。后半部分由SAP成都研究院菜園子小哥王聰向您介紹Twitter的懶加載實現。 關于王聰的背景介紹&#x…

萬彩錄屏服務器不穩定,萬彩錄屏 云服務器

萬彩錄屏 云服務器 內容精選換一換內網域名是指僅在VPC內生效的虛擬域名,無需購買和注冊,無需備案。云解析服務提供的內網域名功能,可以讓您在VPC中擁有權威DNS,且不會將您的DNS記錄暴露給互聯網,解析性能更高&#xf…

針對數據科學家和數據工程師的4條SQL技巧

SQL has become a common skill requirement across industries and job profiles over the last decade.在過去的十年中,SQL已成為跨行業和職位描述的通用技能要求。 Companies like Amazon and Google will often demand that their data analysts, data scienti…

C# 讀取CAD文件縮略圖(DWG文件)

//C# 讀取CAD文件縮略圖(DWG文件) 楊航收集技術資料,分享給大家 //2010-09-04 16:34:58| 分類: C# |字號 訂閱//在不使用任務插件的情況下讀取DWG文件的縮略圖,以便在沒有安裝AutoCAD的計算機上瀏覽。using System;u…

全排列算法實現

版權聲明&#xff1a;本文為博主原創文章&#xff0c;未經博主允許不得轉載。 https://blog.csdn.net/summerxiachen/article/details/605796231.全排列的定義和公式&#xff1a; 從n個數中選取m&#xff08;m<n&#xff09;個數按照一定的順序進行排成一個列&#xff0c;叫…

14.并發容器之ConcurrentHashMap(JDK 1.8版本)

1.ConcurrentHashmap簡介 在使用HashMap時在多線程情況下擴容會出現CPU接近100%的情況&#xff0c;因為hashmap并不是線程安全的&#xff0c;通常我們可以使用在java體系中古老的hashtable類&#xff0c;該類基本上所有的方法都采用synchronized進行線程安全的控制&#xff0c;…

modbus注意幾點

1、 在利用Modbus通訊的過程中&#xff0c;遇到這樣一個問題&#xff0c;即浮點數的傳輸問題。因為一般浮點數都是32位&#xff0c;而Modbus總線中只能傳輸最多16位的數據。解決方法&#xff1a;可以利用兩個整形數傳送一個浮點數&#xff08;即將一個32位的二進制數分割成兩個…

服務器虛擬化網口,服務器安裝虛擬網口

服務器安裝虛擬網口 內容精選換一換Atlas 800 訓練服務器(型號 9010)安裝上架、服務器基礎參數配置、安裝操作系統等操作請參見《Atlas 800 訓練服務器 用戶指南 (型號9010)》。Atlas 800 訓練服務器(型號 9010)適配操作系統如表1所示。請參考表2下載驅動和固件包。Atlas 800 訓…

芒果云接嗎_芒果糯米飯是生產力的關鍵嗎?

芒果云接嗎Would you like to know how your mood impact your sleep and how your parents influence your happiness levels?您想知道您的心情如何影響您的睡眠以及您的父母如何影響您的幸福感嗎&#xff1f; Become a data nerd, and track it!成為數據書呆子&#xff0c;…

hdoj4283 You Are the One

題意&#xff1a;每個人出場時獲得等待時間*值的unhappy值。有個棧換出場順序。問怎樣最小&#xff1f; 一開始的時候覺得在中間取斷點&#xff0c;dp[i][j]表示區間全出場后的最小值。那么dp[i][j]dp[i][k]dp[k1][j]&#xff0c;但這樣是不行的。因為有可能最優解是[i][k]只出…

laravel-admin 開發 bootstrap-treeview 擴展包

laravel-admin 擴展開發文檔https://laravel-admin.org/doc... 效果圖&#xff1a; 開發過程&#xff1a; 1、先創建Laravel項目&#xff0c;并集成laravel-admin&#xff0c;教程&#xff1a; http://note.youdao.com/notesh... 2、生成開發擴展包 php artisan admin:extend c…

怎么看服務器上jdk安裝位置,查看云服務器jdk安裝路徑

查看云服務器jdk安裝路徑 內容精選換一換用戶可以在公有云MRS集群以外的節點上使用客戶端&#xff0c;在使用客戶端前需要安裝客戶端。如果集群外的節點已安裝客戶端且只需要更新客戶端&#xff0c;請使用安裝客戶端的用戶例如root。針對MRS 3.x之前版本的集群&#xff0c;需要…

公司生日會生日禮物_你的生日有多受歡迎?

公司生日會生日禮物In the years before 2020, it was common for a large number of school children (20–30 or more) to physically colocate for their math lessons. And in many a class, students were asked to compute the probability that two of them had the sam…