n皇后问题 Posted on 2020-08-25 Words count in article: 1.7k | Reading time ≈ 7 n皇后问题在n×n的棋盘上放置彼此不受攻击的n个皇后。按照国际象棋的规则,皇后可以攻击与之在同一行、同一列、同一斜线上的棋子。设计算法在n×n的棋盘上放置n个皇后,使其彼此不受攻击。在第i行第j列放置一个皇后,那么第i行的其他位置(同行),那么第j列的其他位置(同列),同一斜线上的其他位置,都不能放 ... Read more »
约瑟夫问题 Posted on 2020-08-25 Words count in article: 399 | Reading time ≈ 1 约瑟夫问题Description 实现一个循环链表,并解决约瑟夫问题: n 个人围成一个圆圈,首先第1个人从1开始一个人一个人顺时针报数, 报到第m个人,令其出列。然后再从下一个人开始,从1顺时针报数,报到第m个人,再令其出列,…,如此下去, 直到圆圈中只剩一个人为止。此人即为优胜者 Input ... Read more »
用数组实现一个栈 Posted on 2020-08-25 Words count in article: 511 | Reading time ≈ 2 用数组实现一个栈1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757 ... Read more »
Pandas基础2 Posted on 2020-08-07 Words count in article: 1.7k | Reading time ≈ 7 Pandas SeriesFirst Steps with Pandas Series1import pandas as pd 1titanic = pd.read_csv("titanic.csv") 1titanic.info() 1titanic["age"] 从DataFrame当中选出 ... Read more »
Multiple_and_Polynomial_Regression Posted on 2020-08-05 Words count in article: 2.9k | Reading time ≈ 11 Multiple and Polynomial Regression学习自 Udemy课程以及博客 https://www.jianshu.com/p/82966686c68c Multiple Regression 多元回归Intuition 我们来看着这次的数据集。Profit是我们要预测的量 ... Read more »
Simple_Linear_Regression Posted on 2020-08-05 Words count in article: 588 | Reading time ≈ 2 Simple Linear RegressionIntuition线性回归是利用数理统计中回归分析,来确定两种或两种以上变量间相互依赖的定量关系的一种统计。在散点图上绘制一条直线,使得这条直线尽可能多通过数据点,要求出最佳拟合线需要求出回归方程y=a+bx,其中a为截距,b为回归系数,在方程中使得y ... Read more »
pandas基础1 Posted on 2020-07-19 Words count in article: 1.9k | Reading time ≈ 8 pandas基础1pandas操作技巧:tab自动补全,shift+tab 显示方法中的参数等提示信息 Pandas Basics如何创建,读取文件的操作这里就不再提了。 Pandas Display Option and head() & tail()显示一张表格的内容我们可以直接输入da ... Read more »
离散数学之逻辑 Posted on 2020-07-17 Words count in article: 3.5k | Reading time ≈ 19 离散数学之逻辑ConnectivesNegation (not): $\lnot$ (unary connective) 非 Conjunction (and): $\land$ (binary connective) ... Read more »
plotly基础 Posted on 2020-07-12 Words count in article: 11.2k | Reading time ≈ 60 plotly基础图画学习自官方文档:https://plotly.com/python/ 保存图片:下载 plotly-orca package ,fig.write_image(“images/fig1.png”) 保存 运用plotly画图的步骤,主要可以分成三类,我尝试归纳一下: 使用 Pl ... Read more »
seaborn基础 Posted on 2020-07-11 Words count in article: 10k | Reading time ≈ 47 Seaborn基础seaborn 是数据可视化中一个很重要的库。Seaborn是基于matplotlib的图形可视化python包。它提供了一种高度交互式界面,便于用户能够做出各种有吸引力的统计图表。 Seaborn是在matplotlib的基础上进行了更高级的API封装,从而使得作图更加容易,在大 ... Read more »