mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 18:59:59 +01:00
Add support for math
This commit is contained in:
@@ -68,9 +68,15 @@ Once the model type is defined, the next step is to delve into the full workflow
|
||||
|
||||
A machine learning project generally follows these steps:
|
||||
|
||||
1. **Data Preparation** Splitting data into training and testing sets.\* Preprocessing: scaling, handling missing values, etc.
|
||||
2. **Model Training** Fitting the model on training data: `model.fit(X, y)`.\* Optimising parameters and hyperparameters.
|
||||
3. **Prediction and Evaluation** Making predictions on unseen data: `model.predict(X)`.\* Comparing predictions ($\hat{y}$) with actual values ($y$).
|
||||
1. **Data Preparation**
|
||||
- Splitting data into training and testing sets.
|
||||
- Preprocessing: scaling, handling missing values, etc.
|
||||
2. **Model Training**
|
||||
- Fitting the model on training data: `model.fit(X, y)`.
|
||||
- Optimising parameters and hyperparameters.
|
||||
3. **Prediction and Evaluation**
|
||||
- Making predictions on unseen data: `model.predict(X)`.
|
||||
- Comparing predictions ($$\hat{y}$$) with actual values ($$y$$).
|
||||
|
||||

|
||||
|
||||
@@ -80,14 +86,12 @@ Evaluation is a crucial step to verify the performance of a model. For regressio
|
||||
|
||||
For regression problems, the **R² score** measures the proportion of the target’s variance explained by the model:
|
||||
|
||||
$R2 = 1 - \frac{\text{SS}\_{\text{residual}}}{\text{SS}\_{\text{total}}}$
|
||||
$$R2 = 1 - \frac{\text{SS}_{\text{residual}}}{\text{SS}_{\text{total}}}$$ where:
|
||||
|
||||
Where:
|
||||
- $$\text{SS}\_{\text{residual}}$$ : Sum of squared residuals between actual and predicted values.
|
||||
- $$\text{SS}\_{\text{total}}$$ : Total sum of squares relative to the target’s mean.
|
||||
|
||||
- $\text{SS}\_{\text{residual}}$: Sum of squared residuals between actual and predicted values.
|
||||
- $\text{SS}\_{\text{total}}$: Total sum of squares relative to the target’s mean.
|
||||
|
||||
A $R^2$ close to 1 indicates a good fit.
|
||||
A $$R^2$$ close to 1 indicates a good fit.
|
||||
|
||||

|
||||
|
||||
@@ -95,4 +99,4 @@ With these concepts in mind, you are better equipped to understand and apply ML
|
||||
|
||||
## Conclusion
|
||||
|
||||
Machine learning is revolutionising how we solve complex problems using data. Supervised, unsupervised, and reinforcement learning approaches allow us to tackle a wide variety of use cases. In supervised learning, the model choice depends on the problem type, its complexity, and the appropriate algorithmic approach. Finally, a structured workflow and metrics like the R² score ensure the quality of predictions and analyses.
|
||||
Machine learning is revolutionising how we solve complex problems using data. Supervised, unsupervised, and reinforcement learning approaches allow us to tackle a wide variety of use cases. In supervised learning, the model choice depends on the problem type, its complexity, and the appropriate algorithmic approach. Finally, a structured workflow and metrics like the R² score ensure the quality of predictions and analyses.
|
||||
Reference in New Issue
Block a user