原创 C++併發編程之讀寫鎖(C++17)
STL 和 Boost 都提供了 shared_mutex 來解決「讀者-寫者」問題(必須使用C++17或者後續版本)。shared_mutex 這個名字並不十分貼切,不如 pthread 直呼「讀寫鎖」。 所謂「讀寫鎖」,就是同時可以被
原创 在Markdown中的Latex 基本使用
研究機器學習的時候,在markdown中最常的應用是寫數學公式,和證明。 一, 數學證明塊: $$ \begin{array} {l}{\text { Recall the exponential family form of
原创 [轉] Python使用matplotlib,numpy,scipy進行散點的平滑曲線化方法
原文鏈接:https://blog.csdn.net/cdqn10086/article/details/70143616 首先給出一個沒有smooth過的曲線 import matplotl
原创 金融風控項目
一、問題定義 金融的核心是風險控制。自然而然地,AI的主戰場也變成了如何使用AI技術精準的做風險控制。 在風控領域,有一個很重要的問題是:如何通過用戶的信息來判斷用戶的逾期與否? 我們通過收集用戶的基本信息、地域信息、社交信息等來判斷一個
原创 Linear Algebra : Linear Mapping Concept
Reference: mathematics for machine learning Homomorphism: Injective, Surjective, Bijective. Concept for intuition:
原创 scipy curve_fit 使用例子
一個使用curve_fit來模擬曲線的例子 # From https://docs.scipy.org/ import numpy as np import matplotlib.pyplot as plt from scipy.opt
原创 Algorithms: Kruskal's algorithm and Prim's algorithm for Minimum-spanning-tree
Reference: introduction to algorithm Kruscal Algorithm O(ElgV) by Binary Heaps Prim's algorithm O(E + VlgV) by Fibonacc
原创 Algorithms : N-Queens problem with BackTracking Algorithms
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
原创 Algorithm : Dijkstra's algorithm and Bellmon-Ford Paths algorithm
The Dijkstra's Algorithm for network Graph Problem: There are N network nodes, labelled 1 to N. Given times, a list of
原创 Multivariable Calculus:Lagrange multipliers
Let's consider the example of finding the minimum of the function, along the curve (or, subject to the constraint),
原创 擺脫困境,不要陷入“隱含自我假設”
最近在讀採銅的《精進》對其中的一個觀點深有感觸再次摘抄下來作爲參考。 大致內容如下: 人生由於經歷,習慣和思維慣性等原因,會在我們思考的時候自動植入“隱含假設”,從而限制了思考的角度和範圍。 粗看下,這些隱含假設似乎具有一
原创 Algorithms : Trapping Rain Water II
The problem is from leetcode 407. https://leetcode-cn.com/problems/trapping-rain-water-ii Given an m x n matrix of posi
原创 Algorithms : Sort linklist
Sort a linked list in O(n log n) time using constant space complexity. /** * Definition for singly-linked list. *
原创 Algorithms : enum the Binary Search Tree sequences
Input a datastructre of the binary search tree. and print all of the generated sequences of the binary search tree. for
原创 Algorithms: Is Graph Bipartite
Given an undirected graph, return true if and only if it is bipartite. Recall that a graph is bipartite if we can split