习题1.1 统计学习方法的三要素为:模型、策略、算法。 模型即需要用函数 \(Y=f_\theta(X)\) 或者条件概率分布 \(P_\theta(Y|X)\) 表示。 策略即寻找合适的损失函数,表示预测值与真实值之间的误差,进而构建风险函数。风险函数就是最优化的目标函数。 算法即学习模型时需要选 ...
分类:
其他好文 时间:
2021-06-21 20:51:54
阅读次数:
0
1 #显示跑马灯文字 2 import os 3 import time 4 def main(): 5 content = str(input('输入显示内容:')) 6 while True: 7 os.system('cls') 8 print(content) 9 time.sleep(0. ...
分类:
其他好文 时间:
2021-06-18 19:20:19
阅读次数:
0
元字符 元字符指的是能够被shell解释的特殊字符,每个特殊字符都有其特殊含义,这些字符一方面可用于变量值的运算、我们可以称之为运算符,另外一方面可以和shell命令配合使用来达到更高级的效果 算数运算符 运算符 - / % 算数运算符需要配合下述操作使用 # 浮点运算 bc # 整数运算 expr ...
分类:
其他好文 时间:
2021-06-16 18:34:56
阅读次数:
0
CentOS 安装 git 教程 移除自带 git yum remove git 安装依赖 yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc yum install gcc perl- ...
分类:
其他好文 时间:
2021-06-13 10:37:37
阅读次数:
0
做《TLPI》第四章的最后习题的时候,体会到内容。 常规的I/O操作有open(),read(),write(),close()还有比较特殊的lseek(),ioctl()。 linux在读写一个文件的时候都会通过一个 “文件偏移量”来确定在哪个位置读写,英文是offset, 而lseek()则可以 ...
分类:
其他好文 时间:
2021-06-10 17:57:11
阅读次数:
0
#-*- coding: utf-8 -*-s1 = 'alex'print('我的名字是' + s1 +',' )i = '123a'i1 = int(i) # 字符串转化成数字,字符串必须全部由数字组成。print(i1,type(i1))i2 = 100s1 = str(i2)print(s1 ...
分类:
其他好文 时间:
2021-06-07 19:57:39
阅读次数:
0
excel xlsxwriter XlsxWriter is a Python module that can be used to write text, numbers, formulas and hyperlinks to multiple worksheets in an Excel 200 ...
分类:
编程语言 时间:
2021-06-02 20:53:25
阅读次数:
0
习题 11.4编写你自己的单词计数程序,扩展你的程序,忽略大小写和标点。例如,"example."、"example,"和"Example"应该递增相同的计数器。 #include <string> #include <map> #include <iostream> #include <algor ...
分类:
其他好文 时间:
2021-06-02 14:07:14
阅读次数:
0
1、转换 将字符串s = "alex"转换成列表 s = "alex" s_list = list(s) print(s_list) 将字符串s = "alex"转换成元祖 s = "alex" s_tuple = tuple(s) print(s_tuple) 将列表li = ["alex", " ...
分类:
编程语言 时间:
2021-06-02 12:05:16
阅读次数:
0
一.利用b模式,编写一个cp工具,要求如下: 既可以拷贝文本又可以拷贝视频,图片等文件 用户一旦参数错误,打印命令的正确使用方法,如usage: cp source_file target_file 提示:可以用import sys,然后用sys.argv获取脚本后面跟的参数 #Python学习交流 ...
分类:
编程语言 时间:
2021-06-02 12:04:56
阅读次数:
0