Upload 2 files
Browse files- model.pkl +3 -0
- regressao_california_housing.py +5 -2
model.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c1ad9be927d7997c0f7743ec38056527d0a5fa3e8f7844d46671fd0e567b4164
|
3 |
+
size 708
|
regressao_california_housing.py
CHANGED
@@ -32,6 +32,8 @@ housing = fetch_california_housing()
|
|
32 |
df = pd.DataFrame(housing.data, columns=housing.feature_names)
|
33 |
df['target'] = housing.target
|
34 |
|
|
|
|
|
35 |
# Pré-processamento de Dados: Normalização das variáveis numéricas
|
36 |
scaler = StandardScaler()
|
37 |
df[housing.feature_names] = scaler.fit_transform(df[housing.feature_names])
|
@@ -88,6 +90,7 @@ print(coefficients)
|
|
88 |
"""
|
89 |
|
90 |
# Salvando o modelo
|
91 |
-
|
92 |
|
93 |
-
|
|
|
|
32 |
df = pd.DataFrame(housing.data, columns=housing.feature_names)
|
33 |
df['target'] = housing.target
|
34 |
|
35 |
+
df.head()
|
36 |
+
|
37 |
# Pré-processamento de Dados: Normalização das variáveis numéricas
|
38 |
scaler = StandardScaler()
|
39 |
df[housing.feature_names] = scaler.fit_transform(df[housing.feature_names])
|
|
|
90 |
"""
|
91 |
|
92 |
# Salvando o modelo
|
93 |
+
import pickle
|
94 |
|
95 |
+
with open('model.pkl', 'wb') as file:
|
96 |
+
pickle.dump(model, file)
|