<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>나의 시대를 휩쓰는 Padlet by 서민준</title>
      <link>https://padlet.com/sminejuno/5x17wvxnyyq9nt86</link>
      <description></description>
      <language>en-us</language>
      <pubDate>2023-11-01 11:33:31 UTC</pubDate>
      <lastBuildDate>2023-11-09 05:50:22 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url></url>
      </image>
      <item>
         <title></title>
         <author>sminejuno</author>
         <link>https://padlet.com/sminejuno/5x17wvxnyyq9nt86/wish/2772108277</link>
         <description><![CDATA[<pre><code class="language-notebook-python">import numpy as np
import pandas as pd
from sklearn.datasets import load_wine
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import mean_squared_error, r2_score
wine = load_wine()
X = wine.data
y = wine.target

# 데이터를 훈련 세트와 테스트 세트로 분할
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

# 선형 회귀 모델 생성 및 훈련
linear_model = LinearRegression()
linear_model.fit(X_train, y_train)

# 의사결정 트리 회귀 모델 생성 및 훈련
tree_model = DecisionTreeRegressor()
tree_model.fit(X_train, y_train)

# 랜덤 포레스트 회귀 모델 생성 및 훈련
rf_model = RandomForestRegressor()
rf_model.fit(X_train, y_train)

# 예측
y_pred_linear = linear_model.predict(X_test)
y_pred_tree = tree_model.predict(X_test)
y_pred_rf = rf_model.predict(X_test)

# 모델 평가
mse_linear = mean_squared_error(y_test, y_pred_linear)
r2_linear = r2_score(y_test, y_pred_linear)

mse_tree = mean_squared_error(y_test, y_pred_tree)
r2_tree = r2_score(y_test, y_pred_tree)

mse_rf = mean_squared_error(y_test, y_pred_rf)
r2_rf = r2_score(y_test, y_pred_rf)

print("Linear Regression - Mean Squared Error (MSE):", mse_linear)
print("Linear Regression - R-squared (R2) Score:", r2_linear)

print("Decision Tree Regression - Mean Squared Error (MSE):", mse_tree)
print("Decision Tree Regression - R-squared (R2) Score:", r2_tree)

print("Random Forest Regression - Mean Squared Error (MSE):", mse_rf)
print("Random Forest Regression - R-squared (R2) Score:", r2_rf)

</code></pre>]]></description>
         <enclosure url="" />
         <pubDate>2023-11-01 11:33:50 UTC</pubDate>
         <guid>https://padlet.com/sminejuno/5x17wvxnyyq9nt86/wish/2772108277</guid>
      </item>
      <item>
         <title></title>
         <author>sminejuno</author>
         <link>https://padlet.com/sminejuno/5x17wvxnyyq9nt86/wish/2772123996</link>
         <description><![CDATA[<p>data = load_iris() df = pd.DataFrame(<a rel="noopener noreferrer nofollow" href="http://data.data">data.data</a>, columns=data.feature_names) print(df)</p>]]></description>
         <enclosure url="" />
         <pubDate>2023-11-01 11:49:27 UTC</pubDate>
         <guid>https://padlet.com/sminejuno/5x17wvxnyyq9nt86/wish/2772123996</guid>
      </item>
      <item>
         <title></title>
         <author></author>
         <link>https://padlet.com/sminejuno/5x17wvxnyyq9nt86/wish/2772127520</link>
         <description><![CDATA[<pre><code class="language-notebook-python">from sklearn.datasets import load_iris
import pandas asd pd


data = Ioad_iris() 
df = pd.DataFrame(data.data, columns=data.feature_names) 
print(df)
X = pd.DataFrame(data.data, columns=data.feature_names)
y = data.target


from sklearn.decomposition import PCA

pca = PCA(n_components=2)
X_pca = pca.fit_transform(X)

import matplotlib.pyplot as plt

plt.scatter(X_pca[:, 0], X_pca[:, 1], c=y)
plt.xlabel('Principal Component 1')
plt.ylabel('Principal Component 2')
plt.sho</code></pre>]]></description>
         <enclosure url="" />
         <pubDate>2023-11-01 11:52:48 UTC</pubDate>
         <guid>https://padlet.com/sminejuno/5x17wvxnyyq9nt86/wish/2772127520</guid>
      </item>
   </channel>
</rss>
