16 Oct 2023
from sklearn.svm import SVR
SVM_reg = SVR()
param_grid = [
{'kernel': ['linear'], 'C': [10., 30., 100., 300., 1000., 3000.]},
{'kernel': ['rbf'], 'C': [1.0, 3.0, 10., 30., 100., 300., 1000.0],
'gamma': [0.01, 0.03, 0.1, 0.3, 1.0, 3.0]},
]
grid_search = GridSearchCV(SVM_reg, param_grid, cv=5,
scoring='neg_mean_squared_error',
verbose=2)
# grid_search.fit(housing_prepared, housing_labels)
negative_mse = grid_search.best_score_
rmse = np.sqrt(-negative_mse)
rmse
The scoring parameter expects a utility function, where higher values indicate better performance. However, mean squared error (MSE) is an error metric, where lower values indicate better performance. To convert the MSE into a utility function, the negative value is used.
By using negative MSE as the scoring metric, the grid search algorithm will try to maximize the negative MSE, which is equivalent to minimizing the MSE.
15 Apr 2023
Double-click on each file and click "Install". This will make MesloLGS NF
font available to all applications on your system.
Open Settings in Visual Studio Code: Code → Preferences → Settings.
Enter terminal.integrated.fontFamily
in the search box at the top of Settings tab and set the value below to MesloLGS NF
.
11 Apr 2023
The algorithm being used for hashing is not supported by your version of OpenSSL.
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
Add this to your .zshrc
export NODE_OPTIONS=--openssl-legacy-provider
31 Jan 2023
Creates a new page with model, view, and controller, including CRUD
operations.
rails g scaffold Person name:string quote:text
rails db:migrate
Does not create a model or CRUD operations.
rails g controller Person index
09 Jan 2019
ssh-keygen -t ed25519