糊氏佳骏
糊氏佳骏
全部文章
分类
题解(5)
归档
标签
去牛客网
登录
/
注册
糊氏佳骏的博客
全部文章
(共7篇)
题解 | #二分 K-means子网分割#
import math # If you need to import additional packages&nbs***bsp;classes, please import here. ...
Python3
2025-10-16
0
51
题解 | #实现Masked Multi-Head Self-Attention#
import math n, d = map(int, input().split()) x = [] for _ in range(n): x....
Python3
2025-10-16
0
48
题解 | #K-Means聚类下的Anchor优化输出#
def distance(box1, box2): w1, h1 = box1 w2, h2 = box2 &n...
Python3
2025-10-09
1
46
题解 | #验证集可达到的最优F1值#
节点编号和特征编号不从0开始是一大坑... class BinTree: def __init__(self, N, M, K, tree, samples, labe...
Python3
2025-09-15
0
47
题解 | #标签在前K个近邻中的出现次数#
常规的KNN分类, 只是最后有相同频次的标签需要额外处理 class KNN: def __init__(self, K, M, N, S, sample, lab...
Python3
2025-09-15
0
61
题解 | 手写实现的二分类预测器
import numpy as np import sys import json class BinaryClassifier: def __init__(self, train, test): self.n, self.m = train.shape ...
2025-09-10
0
62
题解 | 基于相关性分析的特征选择实现
还以为是打印前K个, 结果没用上... import numpy as np class Pireson: def __init__(self, N, M, K, data): self.N = N self.M = M self.K = ...
2025-09-08
0
52