![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习笔记
Marina-ju
这个作者很懒,什么都没留下…
展开
-
量化面试题及答案
3月份亏钱了,还有房贷,可是想来想去还是想做股票。也许这就叫做狗改不了吃屎。空仓,每天做一些题,加深理解,在此做个记录。对冲和复制问2.32:看跌期权可以用来做什么?答:对冲,投机,套利4月15日:要把握的是确定性(趋势),而不是被波动性牵着鼻子走The Greeks(期权价格的敏感度)问2.43:在给定计算价格的方法时,计算Greeks的方法都有哪些,各有那些优缺点?...原创 2020-04-15 17:22:39 · 7193 阅读 · 0 评论 -
sklearn线性拟合基本框架
“”"This is a simple example of LinearRegression“”"Import librariesimport numpy as npfrom sklearn.linear_model import LinearRegressionx=np.array([[1,1],[1,2],[2,2],[2,3]])#y=1x_0+2x_1+3y=np.dot...原创 2018-12-26 22:48:02 · 490 阅读 · 0 评论 -
sklearn.preprocessing中对数据的标准化( StandardScaler)
#转化函数为:z = (x - u) / s,Z为转化后的值,x为当 前值, u为均值, s为样本的标准差from sklearn.preprocessing import StandardScalerdata = [[0, 0], [0, 0], [1, 1], [1, 1]]scaler = StandardScaler()print(scaler.fit(data))St...原创 2018-12-27 08:52:37 · 3692 阅读 · 0 评论 -
make_classification
原博客:https://blog.csdn.net/dataningwei/article/details/53649330转载 2018-12-27 09:26:11 · 3875 阅读 · 0 评论 -
装饰器函数decorator学习笔记
讲得比较透彻的博文链接:https://www.cnblogs.com/yutongzhu/p/5615764.html wraps函数的作用防止被修饰的函数的名称发生改变 简洁教程的链接:https://learnxinyminutes.com/docs/python3/,在最后面...原创 2018-12-16 20:29:42 · 99 阅读 · 0 评论 -
用scikit-learn学习主成分分析(PCA)
这篇文章写的非常详细https://www.cnblogs.com/pinard/p/6243025.html转载 2018-12-27 14:19:43 · 211 阅读 · 0 评论 -
sklearn.random_projection讲的较详细
sklearn.random_projection:https://www.jianshu.com/p/d59cf1618dbd转载 2018-12-27 16:35:14 · 1328 阅读 · 0 评论 -
matplotlib.pyplot画图是报错的处理方法
按下面方式处理即可:matplotlib.use(“TkAGG”)import matplotlib.pyplot as plt原创 2018-12-22 12:49:54 · 1390 阅读 · 0 评论 -
import matplotlib.pyplot as plt 报错解决方法
import matplotlibmatplotlib.use(“TkAgg”)##"add this between “import matplotlib” and “import matplotlib.pyplot as plt”##import matplotlib.pyplot as pltimport numpy as np原创 2018-12-22 16:38:36 · 10422 阅读 · 0 评论 -
关于pandas_datareader的一些解释
参看以下链接:1.https://blog.csdn.net/jinruoyanxu/article/details/791542242.https://pandas-datareader.readthedocs.io/en/latest/remote_data.html#iexpandas_datareader可以方便获得下面公司和机构的数据:Yahoo! Finance//雅虎金融G...原创 2018-12-22 17:36:56 · 4625 阅读 · 0 评论 -
plt.imshow()
https://blog.csdn.net/goldxwang/article/details/76855200https://matplotlib.org/api/_as_gen/matplotlib.pyplot.axis.html#matplotlib.pyplot.axis转载 2018-12-28 14:33:12 · 9523 阅读 · 0 评论 -
make_multilabel_classification的教学举例
“”"Plot randomly generated multilabel datasetThis illustrates the datasets.make_multilabel_classification datasetgenerator. Each sample consists of counts of two features (up to 50 intotal), which...原创 2018-12-28 14:44:43 · 1248 阅读 · 0 评论 -
pandas_datareader库的学习
通过help函数看pandas_datareader库,之后便可以尝试相关方法。如下:import pandas_datareader as pdrhelp(pdr)Help on package pandas_datareader:NAMEpandas_datareaderPACKAGE CONTENTS_testing_utils_versionav (package)...原创 2018-12-23 10:18:05 · 5977 阅读 · 0 评论 -
SVC和CCA
SVC:1.将低纬度不能线性分类的投射到高纬度2.引入超平面(hyper-plane)对数据进行线性分类3.引入tolerance等参数CCA :来自博文:https://blog.csdn.net/szlcw1/article/details/52336824...转载 2018-12-28 19:06:34 · 204 阅读 · 0 评论 -
python写入换行
aarray([[‘a’, ‘b’, ‘c’, ‘d’, ‘message’],[‘1’, ‘2’, ‘3’, ‘4’, ‘hello’],[‘5’, ‘6’, ‘7’, ‘8’, ‘world’],[‘9’, ‘10’, ‘11’, ‘12’, ‘foo’]], dtype=’<U7’)lists=[str(line)+"\n" for line in a]f.w...原创 2018-12-23 21:14:44 · 7893 阅读 · 0 评论 -
布尔值数组的方法
arr.cumprod(axis=1 ):二维数组中,以行为轴,返回从1开始元素累计积arr.cumsum(axis=1 ):二维数组中,以行为轴,返回从1开始元素累计和arr.any():用来检查布尔值数组中是否含有Truearr.all():用来检查布尔值数组中是否全为Truetalking is cheap凡事思考和理智先慢一步优于错一步...原创 2018-12-18 13:45:02 · 5782 阅读 · 0 评论 -
np.log1p &check_random_state(seed)
1.np.log1p:https://blog.csdn.net/qq_36523839/article/details/82422865(数据平滑处理)check_random_state(seed):parameters:seed :None | int | instance of RandomStateIf seed is None, return the RandomState ...转载 2018-12-24 09:54:55 · 1594 阅读 · 0 评论 -
python shell 进入不同目录(directory)的方式
原创 2018-12-18 19:42:47 · 1525 阅读 · 0 评论 -
cov&Cross-validation
cov:协方差,对两个变量同时变化的度量(Covariance indicates the level to which two variables vary together),numpy.covhttps://www.cnblogs.com/terencezhou/p/6235974.htmlCross-validation:PCR:Principal Components Regr...原创 2018-12-29 17:47:33 · 123 阅读 · 0 评论 -
isotonic-regression&matplotlib
isotonic-regression:http://fa.bianp.net/blog/2013/isotonic-regression/matplotlibzorder:控制绘图顺序matplotlib画多图时刻度的设置:https://blog.csdn.net/zxyhhjs2017/article/details/81152752...转载 2018-12-25 17:34:49 · 128 阅读 · 0 评论 -
klearn pipeline
https://blog.csdn.net/dss_dssssd/article/details/82840256转载 2019-01-04 23:06:08 · 166 阅读 · 0 评论 -
mysql外键约束( foreign key)
单一外键和复合外键一个表中可以有多个外键外键字段可以为空;外键字段必须具有唯一性即unique约束原创 2019-01-10 15:03:43 · 136 阅读 · 0 评论 -
数据集字符编码设置(模糊查找)
Last login: Tue Jan 8 15:34:02 on consolebnz@MacBook-Pro-3 ⮀ ~ ⮀ ⭠ master± ⮀ cd usrcd: no such file or directory: usr✘ bnz@MacBook-Pro-3 ⮀ ~ ⮀ ⭠ master± ⮀ cd localcd: no such file or directory: l...原创 2019-01-10 15:22:56 · 302 阅读 · 0 评论 -
选出所有学生所在班级
mysql> select s.,c. from t_student s join t_class c on s.classno=c.cno;±----±---------±--------±----±---------------+| sno | sname | classno | cno | cname |±----±---------±--------±-...原创 2019-01-10 15:48:07 · 463 阅读 · 0 评论 -
mysql数据表的级联更新与级联删除
需要在加外键时加上:on update cascadeon delete cascade删除外键foreign key:mysql> alter table t_student drop foreign key t_student_classno_fk;Query OK, 0 rows affected (0.02 sec)Records: 0 Duplicates: 0 W...原创 2019-01-10 17:31:35 · 883 阅读 · 0 评论 -
casewhenthenelseend语句
https://www.bilibili.com/video/av14716238/?p=55原创 2019-01-10 17:40:04 · 188 阅读 · 0 评论 -
关于事务的举例
https://www.bilibili.com/video/av14716238/?p=78原创 2019-01-10 19:03:53 · 569 阅读 · 0 评论 -
mysql事务(transaction)
mysql数据库管理系统中,默认情况下,事务是自动提交的,也就是说,只执行一条DML语句,开启事务,提交事务。关闭自动提交事务进行手动操作的方式一:例1:start transaction;手动开启DML,,,,DML,,,,DML,,,,DML,,,,commit;手动提交例2:start transaction;手动开启DML,,,,DML,,,,DML,,,,DM...原创 2019-01-10 20:52:24 · 130 阅读 · 0 评论 -
mysql设置隔离级别及作用域
1.打开my.ini文件,在mysqlid中设置:transaction -isolation=read commited2.通过命令方式设置隔离级别:set transaction isolation level read committed不设或session作用于会话级别,global作用于全局级别...原创 2019-01-10 21:25:05 · 906 阅读 · 0 评论 -
plt.scatter()
https://blog.csdn.net/m0_37393514/article/details/81298503转载 2018-12-26 11:46:34 · 1676 阅读 · 0 评论 -
make_multilabel_classification
https://blog.csdn.net/gaoborl/article/details/82869858转载 2018-12-26 11:47:16 · 381 阅读 · 0 评论 -
mysql transaction事务隔离级别的设置
mysql> set global transaction isolation level read committed;mysql> start transaction;Query OK, 0 rows affected (0.00 sec)mysql> show tables;±---------------+| Tables_in_liu |±-------...原创 2019-01-11 21:06:20 · 1202 阅读 · 1 评论 -
mysql中删除表中数据和表
delete from t_student;(删除表格t_student中的数据)drop table t_student;删除表格t_student当设置为repeatable read时,事务没结束,删除表格会无效原创 2019-01-11 21:25:01 · 3202 阅读 · 1 评论 -
mysql 索引index
一张表中可以有多个字段,每个字段都可以添加一个索引数据量上百万级才适合加索引经常需要修改的数据不适合加索引经常出现在where语句中的字段可以加索引创建索引:create index 索引名+表名(列名)例如:create index t_student_name_index t_student(sname)mysql> create index t_class_cno_in...原创 2019-01-11 21:42:34 · 471 阅读 · 0 评论 -
make_regression
https://www.cnblogs.com/pinard/p/6047802.html转载 2019-01-07 14:39:20 · 4659 阅读 · 0 评论 -
关于primarykey 和key的注意事项
mysql> create table exchange(-> id int not null auto_increment,-> abbrev varchar(32) not null,-> name varchar(255) not null,-> primary key(id));#注意: key和(id)之间没有空格Query OK, 0 rows ...原创 2019-01-12 14:27:04 · 6177 阅读 · 0 评论 -
np.where()
a=np.arange(20).reshape(4,5)aarray([[ 0, 1, 2, 3, 4],[ 5, 6, 7, 8, 9],[10, 11, 12, 13, 14],[15, 16, 17, 18, 19]])np.where(a>10)(array([2, 2, 2, 2, 3, 3, 3, 3, 3], dtype=int64),array(...原创 2019-01-17 20:19:57 · 6735 阅读 · 1 评论 -
soup.select()写的详细清楚
https://www.cnblogs.com/yizhenfeng168/p/6979339.html转载 2019-01-07 20:19:31 · 4645 阅读 · 0 评论 -
fetchall()&strip()
1.fetchall()函数,它的返回值是多个元组,即返回多个行记录,如果没有结果,返回的是()2.strip()函数原型:string.strip(s[, chars]),它返回的是字符串的副本,并删除前导和后缀字符。(意思就是你想去掉字符串里面的哪些字符,那么你就把这些字符当参数传入。此函数只会删除头和尾的字符,中间的不会删除。)如果strip()的参数为空,那么会默认删除字符串头和尾的...转载 2019-01-13 15:59:24 · 244 阅读 · 0 评论 -
df.ix的用法
转自:https://blog.csdn.net/weixin_38070397/article/details/80431546转载 2019-01-13 16:01:03 · 11301 阅读 · 5 评论