<?xml version='1.0' encoding='UTF-8'?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel><title>Simon's Blog</title><link>https://Simon-x222.github.io</link><description>日常记录分享</description><copyright>Simon's Blog</copyright><docs>http://www.rssboard.org/rss-specification</docs><generator>python-feedgen</generator><image><url>https://i.postimg.cc/5yGzPXMQ/20241127-151130.jpg</url><title>avatar</title><link>https://Simon-x222.github.io</link></image><lastBuildDate>Mon, 30 Mar 2026 08:14:01 +0000</lastBuildDate><managingEditor>Simon's Blog</managingEditor><ttl>60</ttl><webMaster>Simon's Blog</webMaster><item><title>Writes_4</title><link>https://Simon-x222.github.io/post/Writes_4.html</link><description>为学日益，为道日损

保持学习的心态，放下过多的执念.

-。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/Writes_4.html</guid><pubDate>Mon, 30 Mar 2026 08:13:33 +0000</pubDate></item><item><title>Writes_3</title><link>https://Simon-x222.github.io/post/Writes_3.html</link><description>对于工作中想推进的一些东西，可能阻碍重重，阻碍因素有可能是成本，也有可能是利益关系。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/Writes_3.html</guid><pubDate>Wed, 25 Mar 2026 10:08:06 +0000</pubDate></item><item><title>Writes_2</title><link>https://Simon-x222.github.io/post/Writes_2.html</link><description>为什么我经常难以提笔开始写作，以及输出一些自认为优质的内容。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/Writes_2.html</guid><pubDate>Wed, 18 Mar 2026 09:14:04 +0000</pubDate></item><item><title>Writes_1</title><link>https://Simon-x222.github.io/post/Writes_1.html</link><description>”AI可能会将世界分为 Writes 和 Write-Nots ——不是会不会写，而是自己写不写“

我平常经常在做的，像看视频、看书、听播客等一些行为，在做的时候可能大概率会觉得自己理解了，自己有共鸣，觉得已经是自己的东西了，但事实上，没有经过思考-整理-输出，没有在大脑中深深地划过一刀，依然只是停留在观点，不是属于自己的东西.。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/Writes_1.html</guid><pubDate>Wed, 11 Mar 2026 10:01:01 +0000</pubDate></item><item><title>工作随记</title><link>https://Simon-x222.github.io/post/gong-zuo-sui-ji.html</link><description>1。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/gong-zuo-sui-ji.html</guid><pubDate>Wed, 23 Apr 2025 09:17:37 +0000</pubDate></item><item><title>人工智能：科幻概念与现实</title><link>https://Simon-x222.github.io/post/ren-gong-zhi-neng-%EF%BC%9A-ke-huan-gai-nian-yu-xian-shi.html</link><description>最近随着 DeepSeek的流行，AI这个概念再次甚嚣尘上。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/ren-gong-zhi-neng-%EF%BC%9A-ke-huan-gai-nian-yu-xian-shi.html</guid><pubDate>Fri, 28 Mar 2025 03:54:05 +0000</pubDate></item><item><title>烹饪随记</title><link>https://Simon-x222.github.io/post/peng-ren-sui-ji.html</link><description>### UPDATING...

### 10. 四季豆炒肉 _2025.3.31_

![Image](https://github.com/user-attachments/assets/5ea78ac0-9b3d-4db3-bbbb-e2c396361a9f)

### 9. 辣椒炒肉 _2025.3.25_

![Image](https://github.com/user-attachments/assets/5afa3ee3-5775-4b7f-8a7d-08737c11f488)

### 8. 可乐鸡翅2.0 _2025.3.23_

![Image](https://github.com/user-attachments/assets/29db9a3c-0796-4ede-b985-721b29ebbe94)

### 7. 可乐鸡翅根 _2025.3.19_

收汁

![Image](https://github.com/user-attachments/assets/677eb4f7-03e1-49e4-87cd-0c01d2767a8b)

成果

![Image](https://github.com/user-attachments/assets/5efab29f-8271-4c2e-87ae-6033179c50c8)

### 6. 土豆面（糊） _2025.3.17_

![Image](https://github.com/user-attachments/assets/84877152-31f1-4fe3-a036-5c405c7d769f)

### 5. 黄瓜炒蛋 _2025.3.17_

![Image](https://github.com/user-attachments/assets/dacfe2d8-3388-4937-9c8d-ce29d43e91bb)

### 4. 炒面炒年糕 _2025.3.16_

![Image](https://github.com/user-attachments/assets/2ada4d14-13ff-45ca-9e2f-e8c62303fc1d)

### 3. 手撕包菜 _2025.3.16_

![Image](https://github.com/user-attachments/assets/0fc29750-750c-4117-86ec-d66bca3ef3e7)

### 2. 酸辣土豆丝 _2025.3.15_

前期准备

![Image](https://github.com/user-attachments/assets/9377ce99-4687-478e-ac6b-05fdc73089ac)

成果

![Image](https://github.com/user-attachments/assets/d4ad1da3-d1f3-4f19-8244-34d1fe064129)

### 1. 蛋炒饭 _2025.3.14_

![Image](https://github.com/user-attachments/assets/2f775dc4-6738-4e72-8186-5e63c04cdafc)

![Image](https://github.com/user-attachments/assets/2d0a468e-e488-4bc9-8539-3431896517ff)。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/peng-ren-sui-ji.html</guid><pubDate>Thu, 13 Mar 2025 03:40:38 +0000</pubDate></item><item><title>日期数据转换</title><link>https://Simon-x222.github.io/post/ri-qi-shu-ju-zhuan-huan.html</link><description>`lubridate` 提供了更宽松的日期解析方法，能够自动适应不同的日期格式&#13;
```&#13;
install.packages('lubridate')                               &#13;
library(lubridate)&#13;
```&#13;
然后使用 mdy()、dmy() 等函数来自动解析日期格式，具体取决于日期格式&#13;
```&#13;
# 使用 lubridate 解析日期&#13;
reviews$date &lt;- mdy(reviews$date)&#13;
&#13;
# 查看转换后的日期&#13;
head(reviews$date)&#13;
```&#13;
。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/ri-qi-shu-ju-zhuan-huan.html</guid><pubDate>Tue, 31 Dec 2024 09:04:21 +0000</pubDate></item><item><title>多元回归分析实例——基于R</title><link>https://Simon-x222.github.io/post/duo-yuan-hui-gui-fen-xi-shi-li-%E2%80%94%E2%80%94-ji-yu-R.html</link><description>### 模型构建与分析&#13;
多元线性回归模型调用：lm(formula = Price ~ GSM + Material + Pattern + Opacity, data = reg_data) &#13;
回归结果：&#13;
![image](https://github.com/user-attachments/assets/b462e1c5-d887-4f8a-b6e0-c0dc5593d72d)&#13;
&#13;
解释结果：&#13;
1. (Intercept) 截距项估计值为43.847715，当GSM、遮光度为0，材质为纯聚酯纤维，模式为简约纹理时，预计价格为43.85美元&#13;
2. GSM估计值为0.243801，每增加1 GSM，价格预计平均增加约0.244美元&#13;
3. MaterialBlended 估计值为20.174001，使用混纺材质的产品相比纯Polyester，价格平均增加约20.17美元&#13;
4. PatternComplex 和Opacity 的显著性水平分别是0.7707，0.9668，均&gt;0.05，对价格的影响不显著&#13;
5. 可视化 Pattern 与 Price之间的关系如下&#13;
![image (2)](https://github.com/user-attachments/assets/ec71d9d8-9c97-4308-a801-90a70d8e18c0)&#13;
&#13;
6. 可视化 Opacity 与 Price 的关系如下&#13;
![image](https://github.com/user-attachments/assets/ee22b52f-1f67-4bce-ab7e-ab7215ed4b16)&#13;
&#13;
### 源代码&#13;
```&#13;
library(dplyr)`&#13;
library(stringr)&#13;
library(car)&#13;
library(tidyverse)&#13;
library(stringr)&#13;
library(caret)&#13;
library(readxl)&#13;
&#13;
file_path &lt;- 'C:\\Users\\PC-HMC\\Desktop\\123.xlsx'&#13;
data &lt;- read_excel(file_path)&#13;
str(data)          #查看数据结构&#13;
sum(is.na(data))   #检查是否有缺失值&#13;
&#13;
# 1. 清洗Material：将纯Polyester标记为'P'，混纺材质标记为'B'&#13;
data &lt;- data %&gt;%&#13;
  mutate(Material = tolower(Material),&#13;
         Material = ifelse(str_detect(Material, 'polyester') &amp; !str_detect(Material, '/|\\+|,'), 'Pure_Polyester', 'Blended'))&#13;
&#13;
# 2. 清洗Pattern：将'Solid'标记为'Simple'，其他标记为'Complex'&#13;
data &lt;- data %&gt;%&#13;
  mutate(Pattern = ifelse(str_detect(Pattern, regex('solid', ignore_case = TRUE)), 'Simple', 'Complex'))&#13;
&#13;
# 3. 清洗Opacity：提取数值，计算平均值&#13;
clean_opacity &lt;- function(opacity) {&#13;
  # 提取所有百分比数字&#13;
  nums &lt;- as.numeric(str_extract_all(opacity, '\\d+\\.?\\d*')[[1]])&#13;
  if(length(nums) == 0){&#13;
    return(NA)&#13;
  } else {&#13;
    return(mean(nums))&#13;
  }&#13;
}&#13;
&#13;
data$Opacity_Clean &lt;- sapply(data$Opacity, clean_opacity)&#13;
&#13;
# 4. 清洗GSM：提取数值，计算平均值&#13;
clean_gsm &lt;- function(gsm) {&#13;
  # 提取所有数字&#13;
  nums &lt;- as.numeric(str_extract_all(gsm, '\\d+\\.?\\d*')[[1]])&#13;
  if(length(nums) == 0){&#13;
    return(NA)&#13;
  } else {&#13;
    return(mean(nums))&#13;
  }&#13;
}&#13;
&#13;
data$GSM_Clean &lt;- sapply(data$GSM, clean_gsm)&#13;
&#13;
# 5. 处理Price中的范围（例如，Julian和Nathan有范围）&#13;
# 对于Price，我们将取平均值&#13;
clean_price &lt;- function(price) {&#13;
  # 检查是否有范围&#13;
  if(grepl('-', price)) {&#13;
    nums &lt;- as.numeric(str_extract_all(price, '\\d+\\.?\\d*')[[1]])&#13;
    return(mean(nums))&#13;
  } else {&#13;
    return(as.numeric(price))&#13;
  }&#13;
}&#13;
&#13;
# 在此数据集中，Price字段大部分是单一值，但有一些行可能包含范围&#13;
# 例如，Julian和Nathan的GSM包含范围，需要特别处理&#13;
# 但Price似乎没有范围，所以此步骤可能不需要&#13;
# 但为了稳妥，保留处理步骤&#13;
&#13;
data$Price_Clean &lt;- as.numeric(data$Price)  # 当前数据中Price无范围&#13;
&#13;
# 6. 处理GSM_Clean中的范围&#13;
# 已在GSM_Clean列中完成&#13;
&#13;
# 查看清洗后的数据&#13;
head(data)&#13;
&#13;
&#13;
# 选择需要的列&#13;
reg_data &lt;- data %&gt;%&#13;
  select(Price = Price_Clean, GSM = GSM_Clean, Material, Pattern, Opacity = Opacity_Clean) %&gt;%&#13;
  na.omit()  # 移除缺失值&#13;
&#13;
# 转换为因子变量&#13;
reg_data$Material &lt;- factor(reg_data$Material, levels = c('Pure_Polyester', 'Blended'))&#13;
reg_data$Pattern &lt;- factor(reg_data$Pattern, levels = c('Simple', 'Complex'))&#13;
&#13;
# 建立回归模型&#13;
model &lt;- lm(Price ~ GSM + Material + Pattern + Opacity, data = reg_data)&#13;
&#13;
# 查看回归结果&#13;
summary(model)&#13;
&#13;
&#13;
# 可视化Pattern与Price的关系&#13;
library(ggplot2)&#13;
&#13;
ggplot(reg_data, aes(x = Pattern, y = Price)) +&#13;
  geom_boxplot() +&#13;
  labs(title = 'Price vs Pattern', x = 'Pattern', y = 'Price')&#13;
&#13;
# 可视化Opacity与Price的关系&#13;
ggplot(reg_data, aes(x = Opacity, y = Price)) +&#13;
  geom_point() +&#13;
  geom_smooth(method = 'loess') +&#13;
  labs(title = 'Price vs Opacity', x = 'Opacity (%)', y = 'Price')&#13;
&#13;
# 查看异常值&#13;
outliers &lt;- reg_data %&gt;% filter(abs(std_resid) &gt; 3)&#13;
print(outliers)&#13;
&#13;
# 计算影响度量（Cook's distance）&#13;
cooksd &lt;- cooks.distance(model)&#13;
&#13;
# 识别高影响点&#13;
high_influence &lt;- reg_data %&gt;% filter(cooksd &gt; (4/(nrow(reg_data) - length(model$coefficients) - 1)))&#13;
print(high_influence)&#13;
```&#13;
[123.xlsx](https://github.com/user-attachments/files/18244570/123.xlsx)&#13;
&#13;
。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/duo-yuan-hui-gui-fen-xi-shi-li-%E2%80%94%E2%80%94-ji-yu-R.html</guid><pubDate>Wed, 25 Dec 2024 08:25:14 +0000</pubDate></item><item><title>纳瓦尔宝典</title><link>https://Simon-x222.github.io/post/na-wa-er-bao-dian.html</link><description>1. 对一件事情的欲望越小，顾虑就越少，执念就越少，反而越会顺其自然，遵循内心。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/na-wa-er-bao-dian.html</guid><pubDate>Fri, 13 Dec 2024 06:59:38 +0000</pubDate></item><item><title>图片生成网址工具</title><link>https://Simon-x222.github.io/post/tu-pian-sheng-cheng-wang-zhi-gong-ju.html</link><description>## Postimages&#13;
Postimages是一个免费的图片托管平台，旨在提供简单、快速、便捷的图片上传和分享服务，适用于博客、社交媒体或者论坛。</description><guid isPermaLink="true">https://Simon-x222.github.io/post/tu-pian-sheng-cheng-wang-zhi-gong-ju.html</guid><pubDate>Wed, 27 Nov 2024 08:30:54 +0000</pubDate></item></channel></rss>