Bias vs Variance

方差与偏差

泛化误差分为:偏差和方差

偏差:指算法的期望预测值与真实值之间的偏差程度,反应的是模型本身拟合能力 …

more ...

Topological Sorting

Topological Sorting

# Definition for a Directed graph node
class DirectedGraphNode:
    def __init__(self, x):
        self.label = x
        self.neighbors = []


class Solution:
    """
    @param graph: A list of Directed graph node
    @return: A list of integer
    """
    def topSort(self, graph):
        # 1. 统计结点入度
        indegree = self.get_indegree(graph …
more ...


GBDT

问题引入

给定数据集\((x_1, y_1), (x_2, y_2),...,(x_n, y_n)\), 拟合一个模型\(F(x)\)

\(F(x_1) = 1.4\)\(y_1=1.3\)

\(F(x_2) = 0.9\)\(y_2=0.8\)

...

在 …

more ...


Closure

Date Tags Scala

什么是闭包?

引用至少一个自由变量的函数称为闭包。

闭包是一个函数,可纯函数或非纯函数,可有名字或匿名,但重要的是 …

more ...