Pandigital multiples

Problem 38 Description Take the number 192 and multiply it by each of 1, 2, and 3: 192 × 1 = 192 192 × 2 = 384 192 × 3 = 576 By concatenating each product we get the 1 to 9 pandigital, 192384576. We will call 192384576 the concatenated product of 192 and (1,2,3) The same can be achieved by starting with 9 and multiplying by 1, 2, 3,

Counting Sundays

Problem 19 Description You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, twenty-nine. A leap year occurs on any year evenly divisible by 4, but not on century unless it is

Lab06_WriteUp

模型, 统计, 损失函数 损失函数 损失函数是我们用来确定我们模型的最佳参数的。 损失函数是对一个模型能够预测预期结果的程度的一种衡量。换句话说,它衡

Lab07_WriteUp

线性回归 先从一个图例来认识线性回归 下面用这个公式来实现线性回归 样例数据集 $$\hat{y_i} = \bar{y} + r \frac{SD(y)}{SD(x)} (x_i - \bar{x})$$ x 为账单,y 为小费 r为相关系数 1 2 3 4 5 6 x_bar = np.mean(tips["total_bill"]) y_bar

Lab05_WriteUp

Question 1 Question 1a Suppose we wanted to build a histogram of our data to understand the distribution of literacy rates and income per capita individually. We can use countplot in seaborn to create bar charts from categorical data. 1 2 3 4 5 6 7 8 9 10 11 12 plt.figure(figsize=(15,5)) plt.subplot(1,2,1) sns.countplot(df['lit']) plt.xlabel("Adult literacy rate: Female: % ages 15 and older: 2005-14") plt.title('World Bank Female Adult Literacy Rate') plt.