ageron / ageron/handson-ml2

Chapter 5, Excercise 10

Offen
#341 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Jupyter Notebook
Sterne
30k
Forks
13.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hello,

to complete this exercise I directly implemented LinearSVC into the coding of Chapter 2.
As data I used `housing_prepared` and as labels I used `housing_labels`.
In the end I just trained the SVM regressor like that:

```
svm_reg = LinearSVR(random_state=42)
svm_reg.fit(housing_prepared, housing_labels)
```

The score is quite unusual (compared to RandomForest and Linear Regression):

```
housing_predictions = svm_reg.predict(housing_prepared)
svm_reg_mse = mean_squared_error(housing_labels, housing_predictions)
svm_reg_rmse = np.sqrt(svm_reg_mse)
svm_reg_rmse

218339.15956036837
```
Why is it so badly underfitting the data? Why is the error in the exercise 10 so much lower, although the data should be more or less the same (Housing_prepared additionally is scaled, uses the imputer and the OneHotEncoder for Ocean Aprox. and adds some attributes).

thanks

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.