• Classification of machine learning: specifying thresholds


    Logistic regression returns probability. You can use the returned probability “as is” (for example, the probability of users clicking on this advertisement is 0.00023), or you can convert the returned probability into a binary value (for example, this email is spam).If a logistic regression model predicts an e-mail with a return probability of 0.9995, it […]

  • Diagram + code | common current limiting algorithms and thinking of current limiting in single machine distributed scenario


    Hello, I’m yes. Today, let’s talk about current limiting, including common current limiting algorithms, single machine current limiting scenarios, distributed current limiting scenarios and some common current limiting components. Of course, we must be clear before introducing the current limiting algorithm and specific scenariosWhat is current limiting and why?。 Any technology must find out its […]

  • Service flow limiting algorithm, strategy and where to limit flow


    1. What is service flow restriction? With the development of microservices and distributed systems, the mutual invocation between services is becoming more and more complex. In order to ensure the stability and high availability of their own services, certain flow limiting measures should be taken when facing requests that exceed their own service capabilities. Just […]

  • Classification of machine learning: ROC and area under curve


    ROC curve ROC curve (receiver operating characteristic curve)It is a chart showing the effect of classification model under all classification thresholds. The curve draws the following two parameters: Real interest rate False positive interest rate Real interest rate (TPR)Is a synonym for recall rate, so it is defined as follows: TPR = \dfrac{TP}{TP + FN} […]

  • Classification of machine learning: accuracy and recall


    Accuracy rate Accuracy rateThe indicator tries to answer the following questions:What is the proportion of samples identified as positive categories?Accuracy is defined as follows: Precision = \dfrac{TP}{TP + FP} Note: if there are no false positive examples in the prediction results of the model, the accuracy rate of the model is 1.0.Let’s calculatePrevious partAccuracy of […]

  • Threshold segmentation and threshold implementation


    Binary thresholding First, select a specific threshold value, such as 127The new threshold generation rule is:The gray value of pixels greater than or equal to 127 is set to the maximum value (for example, the maximum 8-bit gray value is 255)The gray value of pixels with gray value less than 127 is set to 0 […]

  • Is it easy to learn web front-end development?


    In the past two years, the web front end has been very popular, not only because of the large demand in the recruitment market, but also because of the low entry threshold and simple entry. Is that true? 0 basic Xiaobai can also change careers? Many students have such doubts that it is not so […]

  • Preparation of alarm rules for Prometheus


    1、 Pre knowledge For beingPrometheusMonitoring servers, we all have oneupIndicators, you can know whether the service is online. Up = = 0. The task service is offline. Up = = 1 task service can be online. 2、 Demand For services that are offline for more than 1 minute, an alarm message is generated. 3、 Implementation […]

  • Pytorch version depth residual shrinkage network code


    This article is reproduced as follows: https://zhuanlan.zhihu.com/p/… Original text: deep residual shrink networks for fault diagnosis Authors: Minghang Zhao, Shisheng Zhong, Xuyun Fu Time: September 2019 1. Introduction In order to solve this problem, this paper proposes a residual shrinkage network, which adapts to determine the soft threshold through machine learning to eliminate the influence […]

  • Have you heard of GC for go map?


    In the map structure in golang, when deleting key value pairs, they are not really deleted, but marked. With more and more key value pairs, will it cause a lot of memory waste? First of all, the answer is yes, which is likely to lead to oom, and there is another discussion on this: https://github.com/golang/go/issues/20135 […]

  • Sentinel — Elementary use


    1. Official information GitHub official website address: https://github.com/alibaba/Sentinel wiki:https://github.com/alibaba/Sentinel/wiki/    2. Basic usage two point one   Sentinel’s first experience Introduce dependency com.alibaba.csp sentinel‐core 1.7.1 Initialize degradation rule List rules = new ArrayList<>();DegradeRule rule = new DegradeRule(KEY) .setGrade(CircuitBreakerStrategy.ERROR_RATIO.getType()) // Set ratio threshold to 50%. .setCount(0.5d) .setStatIntervalMs(30000) .setMinRequestAmount(50) // Retry timeout (in second) .setTimeWindow(10);rules.add(rule);DegradeRuleManager.loadRules(rules); Use downgrade […]

  • Using Python for exception detection


    By Rashida nasrin suckyCompile VKSource: towards Data Science Anomaly detection can be handled as a statistical task of outlier analysis. But if we develop a machine learning model, it can be automated as usual and save a lot of time. There are many use cases for exception detection. Credit card fraud detection, fault machine detection […]