Python3 基础教程 - 廖雪峰
Python 程序的运行时间需要 0.1 秒,慢了 100 倍,但由于 网络更慢,需要等待 1 秒,你想,用户能感觉到 1.001 秒和 1.1 秒的区 别吗?这就好比 F1 赛车和普通的出租车在北京三环路上行驶的道理一 样,虽然 F1 赛车理论时速高达 400 公里,但由于三环路堵车的时速只 有 20 公里,因此,作为乘客,你感觉的时速永远是 20 公里。 Python3 基础教程【完整版】 种参数都可以组合使用,除了可变参数 无法和命名关键字参数混合。但是请注意,参数定义的顺序必须是:必 选参数、默认参数、可变参数/命名关键字参数和关键字参数。 比如定义一个函数,包含上述若干种参数: def f1(a, b, c=0, *args, **kw): print('a =', a, 'b =', b, 'c =', c, 'args =', args, 'kw =', kw) def 参数传进去。 >>> f1(1, 2) a = 1 b = 2 c = 0 args = () kw = {} >>> f1(1, 2, c=3) a = 1 b = 2 c = 3 args = () kw = {} >>> f1(1, 2, 3, 'a', 'b') a = 1 b = 2 c = 3 args = ('a', 'b') kw = {} >>> f1(1, 2, 3, 'a'0 码力 | 531 页 | 5.15 MB | 1 年前3机器学习课程-温州大学-Scikit-learn
train_test_split from sklearn.linear_model import LinearRegression from sklearn.metrics import r2_score 基本建模流程 9 2.Scikit-learn主要用法 ✓Scikit-learn支持以NumPy的arrays对象、Pandas对象、SciPy的稀 疏 矩阵及其他可转换为数值型arrays的数据结构作为其输入,前提是 StandardScaler 构建转换器实例 scaler = StandardScaler() 拟合及转换 scaler.fit_transform(X_train) 数据预处理 Z-Score标准化 ?∗ = ? − ? ? ?2 = 1 ? ?=1 ? (? ? −?)2 ? = 1 ? ?=1 ? ? ? 处理后的数据均值为0,方差为1 12 2 将数据映射到[0,1]区间 13 2.Scikit-learn主要用法 特征选择 from sklearn import feature_selection as fs fs.SelectKBest(score_func, k) 过滤式(Filter),保留得分排名前k的特征(top k方式) fs.RFECV(estimator, scoring=“r2”) 封装式(Wrap- per),结合交0 码力 | 31 页 | 1.18 MB | 1 年前3华为云深度学习在文本分类中的实践-李明磊
4000 6000 8000 10000 12000 人工标注 系统标注 样本数目 0.84 0.93 0.75 0.8 0.85 0.9 0.95 人工标注 系统标注 效果:F1 未标注集合 ???????????? ???????????? 种子语料 机器学习模型 人工标注 15 华为云主动学习平台 16 华为云主动学习平台 17 1 2 4 3 分类 100.00% Accuracy Precision Recall F1 score 和友商效果对比-汽车领域 华为1 华为2 友商1 友商2 友商3 友商4 0.00% 20.00% 40.00% 60.00% 80.00% 100.00% Accuracy Precision Recall F1 score 和友商效果对比-电商领域 华为1 华为2 友商1 友商2 友商3 友商3 友商4 0.00% 20.00% 40.00% 60.00% 80.00% 100.00% Accuracy Precision Recall F1 score 和友商效果对比-社交领域 华为1 华为2 友商1 友商2 友商3 友商4 内容: 买没几天就降价一点都不开心,闪存跑分就五百多点点 --- 外观漂亮音质不错,现在电子产品基本上都是华为的了 --- 0 码力 | 23 页 | 1.80 MB | 1 年前3Rust算法教程 The Algos (algorithms)
continue; } let result = minimax(opposite, &board_next); let current_score = match result { Some(x) => x.side, _ => Players::Blank, }; best_move, SinglePlayAction { position: pos, side: current_score, }, ) } best_move } //Promote only better or collate equally scored game as_mut().unwrap(); //New game action is scored from the current side and the current saved best score against the new game action. match (current_side, play_actions.side, appendee.side) {0 码力 | 270 页 | 8.46 MB | 1 年前3机器学习课程-温州大学-05机器学习-机器学习实践
Accuracy = TP + TN TP + TN + FP + FN 精确率 Precision = TP TP + FP 召回率 Recall = TP TP + FN F1 score F1 = 2 × Precision × Recall Precision + Recall 11 评价指标 有100张照片,其中,猫的照片有60张,狗的照片是40张。 输入这100张 x2 Normalization 3.正则化、偏差和方差 17 归一化(最大 - 最小规范化) ?∗ = ? − ?min ?max − ?min 将数据映射到[0,1]区间 Z-Score标准化 ?∗ = ? − ? ? ?2 = 1 ? ?=1 ? (? ? −?)2 ? = 1 ? ?=1 ? ? ? 处理后的数据均值为0,方差为1 数据归一化的目的是使得各特征对0 码力 | 33 页 | 2.14 MB | 1 年前3DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model
length-controlled win rate on AlpacaEval 2.0 (Dubois et al., 2024), 8.97 overall score on MT-Bench (Zheng et al., 2023), and 7.91 overall score on AlignBench (Liu et al., 2023). The English open-ended conversation Testing DeepSeek-V2 Base 128K Context via "Needle In A HayStack" 1 2 3 4 5 6 7 8 9 10 Score Figure 4 | Evaluation results on the “Needle In A Haystack” (NIAH) tests. DeepSeek-V2 performs well 0.606 BBH (EM) 3-shot 68.7 59.9 78.9 81.0 78.9 MMLU (Acc.) 5-shot 71.3 77.2 77.6 78.9 78.5 DROP (F1) 3-shot 69.7 71.5 80.4 82.5 80.1 ARC-Easy (Acc.) 25-shot 95.3 97.1 97.3 97.9 97.6 ARC-Challenge (Acc0 码力 | 52 页 | 1.23 MB | 1 年前3廖雪峰JavaScript教程
birth: 1990, 4. school: 'No.1 Middle School', 5. height: 1.70, 6. weight: 65, 7. score: null 8. }; JavaScript用一个 {…} 表示一个对象,键值对以 xxx: xxx 形式申明,用 , 隔开。注意,最 后一个键值对不需要在末尾加 , ,如果加了,有的浏览器(如低版本的IE)将报错。 birth: 1990, 4. school: 'No.1 Middle School', 5. height: 1.70, 6. weight: 65, 7. score: null 8. }; 2.5 对象 - 32 - 本文档使用 书栈(BookStack.CN) 构建 9. 'name' in xiaoming; // true 10. 'grade' lazy_sum() 时,每次调用都会返回一个新的函数,即使传入相同的参 数: 1. var f1 = lazy_sum([1, 2, 3, 4, 5]); 2. var f2 = lazy_sum([1, 2, 3, 4, 5]); 3. f1 === f2; // false f1() 和 f2() 的调用结果互不影响。 注意到返回的函数在其定义内部引用了局部变量 arr0 码力 | 264 页 | 2.81 MB | 10 月前3阮一峰 《ECMAScript 6入门》 第三版
上面代码中,变量 i 只用来控制循环,但是循环结束后,它并没有消失,泄露成 了全局变量。 ES6 的块级作用域 let 实际上为 JavaScript 新增了块级作用域。 function f1() { let n = 5; if (true) { let n = 10; } console.log(n); // 5 } 上面的函数有两个代码块,都声明了变量 循环不生效。 Proxy 300 let stu1 = {name: '张三', score: 59}; let stu2 = {name: '李四', score: 99}; let handler = { has(target, prop) { if (prop === 'score' && target[prop] < 60) { console.log(`${target oproxy1 = new Proxy(stu1, handler); let oproxy2 = new Proxy(stu2, handler); 'score' in oproxy1 // 张三 不及格 // false 'score' in oproxy2 // true for (let a in oproxy1) { console.log(oproxy1[a]); }0 码力 | 679 页 | 2.66 MB | 1 年前3openEuler OS Technical Whitepaper Innovation Projects (June, 2023)
allocation Stride prefetch Scenario-specific performance Security, reliability, and O&M F1 F1 P1=ptr1 P1=ptr2 F2 F1 F1 F1 P1_ pc =idx1 P1_ pc =idx1 P1_ cmp F2 F2 F2 F2 PAD PAD struct st struct st_pc struct bulletin is issued. A security bulletin includes technical details, CVE identifier, CVSS security score, severity level of the vulnerability, and the affected and fixed versions. You can subscribe to0 码力 | 116 页 | 3.16 MB | 1 年前3The Hitchhiker’s Guide to Logical Verification
server’s score being called first: No point – “Love” First point – “15” Second point – “30” Third point – “40” Fourth point – “Game” except that if each player/team has won three points, the score is “Deuce “Deuce.” After “Deuce,” the score is “Advantage” for the player/team who wins the next point. If that same player/team also wins the next point, that player/team wins the “Game”; if the opposing player/team the score is again “Deuce.” A player/team needs to win two consecutive points immediately after “Deuce” to win the “Game.” We first define an inductive type to represent scores: inductive score : Type0 码力 | 215 页 | 1.95 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100