相关文章

C Primer Plus 第三章 复习题编程练习 答案

复习题 1. 指出下面各种数据使用的合适数据类型(有些可使用多种数据类型): a. East Simpleton的人口  b. DVD影碟的价格  c. 本章出现次数最多的字母  d. 本章出现次数最多的字母次数 答:a.int、short或unsigned short类型。人口是一个整数。   b.…

Simpleton-单例模式

单例模式 定义:采取一定的方法保证在整个软件系统中,某一个类只有一个对象实例,并且该类值提供一个取得该对象的实例方法。 单例模式类图 单例模式的实现方式 1. 饿汉式 静态常量 步骤: 构造器私有化类的内部创建对象向外暴露一…

机器学习算法(逻辑回归)-Lect02

参考资料: 周志华.《机器学习》 李航.《统计学习方法》 cs229 notes 吴恩达机器学习-网易云课堂 1、Logistic回归损失函数的极大似然推导:西瓜书公式3.27怎么推来的? 2、Logistic回归损失函数的最优化算法:什么是牛顿法、拟牛顿法…

lect01_codes03_eg梯度下降

PythonML purpose:梯度下降的实例 利用梯度下降求函数y(x5)^2的最小值 梯度下降算法 import numpy as npdef func(x):return (x5)**2 x_pointsnp.linspace(-10,5,num100) y_pointsfunc(x_points)import matplotlib.pyplot as plt %matplotlib inline plt.figure() plt.plot(…

Lect4_MC_TD_Model_free_prediction

文章目录 Model-Free PredictionMento-Carlo LearningMonte-Carlo Policy EvaluationFirst-Visit Monte-Carlo Policy EvaluationIncremental Mento-Carlo Temporal-Difference LearningMC vs. TD Unified ViewDynamic Programming BackupMento-Carlo BackupTemporal-Differenc…

lect02_codes05_概率论

常见的概率分布 离散型概率分布 1.伯努利分布(Bernoulli Distribution) 伯努利分布亦称"两点分布" “零一分布” 即事件的结果只有两个值 且事件之间相互独列 例如抛一次硬币就成为一次伯努利实验 结果要么为正面要么为反面 伯努利实验只做一次 import numpy as…

Lect6_Value_Function_Approximation

文章目录 Value Funtion ApproximationIntroductionWhy need?Types of Value Function ApproximationWhich Funtion Approximator? Incremental MethodsValue Funtion Approx. by SGDLinear Funtion ApproximationIncremental Prediction AlgorithmsControl with Value Funct…

Lect1 String相关题目

Java 的 String 类基本用法介绍:http://www.runoob.com/java/java-string.html Java 的 String.substring 函数:https://beginnersbook.com/2013/12/java-string-substring-method-example/ Google coding style:https://google.github.io/st…

oracle se lect 中文乱码,Oracle rowid

Oracle rowid 一: rowid 组成 (1)The data object number of the object (2)The data block in the data file in which the row resides (3)The position of the row in the data block (first row is 0) (4)The data file in which the row resides (first file i…

Lect1_Intro_RL

文章目录 Introduction to Reinforcement LearningThe RL Problemstate Inside An RL AgentPolicyValue FunctionModel Problems within RLLearning and PlanningExploration and ExploitationPrediction and Control Introduction to Reinforcement Learning The RL Problem …

Lect3_Dynamic_Programming

文章目录 Planning by Dynamic ProgrammingIntroductionRequirements for DPDP used for planning in an MDP Policy EvaluationIterative Policy EvaluationExample Policy IterationPolicy improvement Value IterationPrinciple of OptimalityDeterministic Value Iteration…

Lect3 最优化Optimization

文章目录 Reference简介损失函数可视化最优化梯度计算使用有限差值进行数值计算微分计算梯度 梯度下降 Reference https://zhuanlan.zhihu.com/p/21387326?referintelligentunithttps://zhuanlan.zhihu.com/p/21360434?referintelligentunit 简介 最优化是求一个最佳的 W W…

lect02_project

1.案例分析 2.数据集描述 提供的数据集为AppleStore.csv 包含了app的相关属性 id:App ID track_name:App名称 size_bytes:App大小 (单位:Byte) price:App价格 rating_count_tot:所有评论数 rating_count_ver:对应版本的评论数 prime_genre:App主…

Lect5_Model_free_Control

文章目录 Model Free ControlOn-Policy Monte-Carlo ControlGeneralised Policy IterationMonte-Carlo Policy IterationPseudocode Monte-Carlo ControlGLIE Monte-Carlo Control On-Policy Temporal-Difference LearningOn-Policy Control With SarsaSarsa( λ \lambda λ)Fo…

Lect2 线性分类

文章目录 ReferenceKNN分类的不足线性分类器Score Function将图像看做高维度的点将线性分类器看做模板匹配偏差和权重的合并技巧图像数据预处理损失函数 Loss function多类支持向量机损失 Multiclass Support Vector Machine Loss正则化(Regularization)…

Lect2_MDPs

文章目录 Markov Decision ProcessesMarkov ProcessesDefinitionMarkov PropertyState Transition Matrix Markov Reward ProcessDefinitionReturnWhy discount Value FunctionBellman Equation Markov Decision ProcessesDefinitionPolicyValue FunctionBellman Expectation E…

lect02_codes04_Seanborn

Pandas及Seanborn绘图 1.Pandas绘图 import pandas as pd import numpy as np import matplotlib.pyplot as plt%matplotlib notebook#设置绘图样式 plt.style.use(seaborn-colorblind)DataFrame绘图 dfpd.DataFrame({A:np.random.randn(365).cumsum(0),B:np.random.randn(3…

HIT DB Lect7

非相关子查询 eg列出没学过李明老师讲授课程的所有同学的姓名?7.8:24 Select Sname From Student Where Sno not in (Select Sno From SCWhere Cno not in (Select CnoFrom TeacherWhere Tname 李明) )UP is wrong! Select Sname From Student Where Sno not…

Lect2 BFS总结

能够用 BFS 解决的问题,一定不要用 DFS 去做 因为用 Recursion 实现的 DFS 可能造成 StackOverflow (NonRecursion 的 DFS 一来你不会写,二来面试官也看不懂) 1. Queue Java常用的队列包括如下几种:    ArrayDeque:数组存储。…

Lect1 图像分类

文章目录 Reference数据集分类What is cross validationKNN相比1-NN的好处 Reference https://zhuanlan.zhihu.com/p/20900216 数据集分类 training settest setvalidation set 当dataset数量过少,使用交叉验证的方法来进行超参数tuning。 What is cross valid…