日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

充分利用昂贵的分析

發布時間:2023/11/29 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 充分利用昂贵的分析 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

By Noor Malik

努爾·馬利克(Noor Malik)

Let’s say you write a query in Deephaven which performs a lengthy and expensive analysis, resulting in a live table. For example, in a previous project, I wrote a query which pulled data from an RSS feed to create a live table of earnings call transcripts, and an expensive Sentiment Analysis machine learning model was used to predict overall sentiments.

假設您在Deephaven中編寫了一個查詢,該查詢執行了冗長且昂貴的分析,從而產生了活動表。 例如,在上一個項目中 ,我編寫了一個查詢,該查詢從RSS提要中提取數據以創建實時收入通話記錄表,并使用了昂貴的Sentiment Analysis機器學習模型來預測總體情緒。

After performing the analysis, you want to use the resulting live table in several other queries. For example, I wanted to use my live table of sentiment predictions in another query which verified whether the sentiment predictions matched the direction of the companies’ stocks. Luckily, Deephaven provides the ability to share tables between queries with Preemptive Tables.

執行分析之后,您想在其他幾個查詢中使用生成的活動表。 例如,我想在另一個查詢中使用我的情緒預測實時表,該查詢驗證了情緒預測是否與公司股票的方向一致。 幸運的是,Deephaven提供了使用搶先表在查詢之間共享表的功能。

With Preemptive Tables, the query processor automatically pushes a consistent snapshot of all data from a table on the server to subscribed clients at regular intervals. The publisher specifies the refresh rate of the Preemptive Table, the frequency at which the table is sent over the network to subscribers, and client queries set a timeout threshold, the maximum amount of time to wait for a connection to the publisher query to be established before the connection times out.

使用搶占式表,查詢處理器會自動將所有數據的一致快照從服務器上的表定期推送到訂閱的客戶端。 發布者指定搶占表的刷新率,該表通過網絡發送給訂戶的頻率以及客戶端查詢設置超時閾值,等待與發布者查詢建立連接的最大時間在連接超時之前。

Any table on the Deephaven server can easily be published as a Preemptive table. In my “EarningsCallSentimentAnalysis” query, I produced a table called callPredictions that I wanted to share as a Preemptive Table with a 2-minute refresh rate. I did so as follows:

Deephaven服務器上的任何表都可以輕松地發布為搶先表。 在我的“ EarningsCallSentimentAnalysis”查詢中,我生成了一個名為callPredictions的表,我希望將其共享為2分鐘刷新率的搶占式表。 我這樣做如下:

callPredictionsPre = callPredictions.preemptiveUpdatesTable(2*60*1000)My callPredictions table我的callPredictions表

My other query, which needed to use my callPredictions table, created a client connection with a timeout threshold of 3 minutes and subscribed to the table as follows:

我的另一個查詢(需要使用我的callPredictions表)創建了一個超時閾值為3分鐘的客戶端連接,并按以下方式訂閱了該表:

With Preemptive Tables, I was able to use the Sym column of the callPredictions table to look up past and present stock prices and join the directions of movement onto callPredictions in a column called Direction. I then created a boolean column called CorrectPrediction, which would show true if a company’s predicted earnings call sentiment matched their stock direction, and false otherwise.

借助Preemptive Tables,我可以使用callPredictions表的Sym列查詢過去和現在的股價,并將移動方向加入到Direction列中的callPredictions上。 然后,我創建了一個名為CorrectPrediction的布爾列,如果公司的預期收益電話情緒與他們的股票方向匹配,它將顯示true,否則顯示false。

Note that companies without values in the Direction and CorrectPrediction columns did not have stock data available.

請注意,“方向”和“正確預測”列中沒有值的公司沒有可用的庫存數據。

My callPredictions table after updates in my other query我的其他查詢更新后的我的callPredictions表

This simple and easy-to-use method of table sharing helped me add another dimension to my Earnings Call Sentiment Analysis project, and allowed me to take my analyses further without having to perform the same lengthy computations again to re-use them for another purpose.

這種簡單易用的表格共享方法幫助我在“收入呼吁情緒分析”項目中添加了新的維度,使我可以進一步進行分析,而不必再次執行相同的冗長計算即可將其重新用于其他目的。

翻譯自: https://medium.com/swlh/get-the-most-out-of-expensive-analyses-fa95f0193d18

總結

以上是生活随笔為你收集整理的充分利用昂贵的分析的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。