This is a file that contains notes for my datascience for programming course for uni.
- Mean Squared Error
- Root Mean Squared Error (RMSE)
- Mean Absolute Error (MAE)
- r2 score
- best score 1.0, can be negative.
Model based learning (eager)
- training phase: build a model using training data
- prediction phase: use the model to make predictions
Instance based learning (lazy)
-
training phase: do nothing
-
prediction phase: compare new instances with training data to make predictions
-
The kNN algorithm simply stores the training dataset.
-
To make a prediction for a new data point, the algorithm finds the closest data points in the training dataset — its “nearest neighbors.”
-
The prediction is an aggregation of the known outputs for the nearest neighbors.
- Example:
- For classification , the prediction is the majority class among the relevant neighbors.
- For regression , the prediction is the average of the relevant neighbors’ labels