Add functions for calculating log-likelihood and null log-likelihood

### Describe the workflow you want to enable

As a user of Scikit-learn, I want to be able to calculate the McFadden's pseudo R-squared for a binary logistic regression model for that we need log-likelihood and null log-likelihood.

### Describe your proposed solution

I use the following functions and I propose to add them in the library as well.  

### For Log Likelihood - 
```python
import numpy as np
from sklearn.linear_model import LogisticRegression

def log_likelihood(model, X, y):
    """Calculate the log-likelihood of a binary logistic regression model.

    Parameters
    ----------
    model : sklearn.linear_model.LogisticRegression
        A trained binary logistic regression model.
    X : array-like, shape (n_samples, n_features)
        Feature matrix.
    y : array-like, shape (n_samples,)
        Binary class labels.

    Returns
    -------
    log_likelihood : float
        The log-likelihood of the model.
    """

    # Get predicted probabilities
    pred_probs = model.predict_proba(X)[:, 1]

    # Calculate log-likelihood
    log_likelihood = np.sum(y * np.log(pred_probs) + (1 - y) * np.log(1 - pred_probs))

    return log_likelihood

```
### For Null Log Likelihood - 
```python
import numpy as np
from sklearn.metrics import log_loss

def null_log_likelihood(y):
    """Calculate the null log-likelihood of a binary logistic regression model.

    Parameters
    ----------
    y : array-like, shape (n_samples,)
        Binary class labels.

    Returns
    -------
    null_log_likelihood : float
        The null log-likelihood of the model.
    """

    # Calculate the proportion of positive class labels
    p0 = y.mean()

    # Create an array of predicted probabilities equal to the proportion of positive class labels
    probs = p0 * np.ones_like(y)

    # Calculate the null log-likelihood using the log_loss function from scikit-learn
    null_log_likelihood = -log_loss(y, probs, normalize=False)

    return null_log_likelihood

```

### Describe alternatives you've considered, if relevant

One alternative to adding these functions to Scikit-learn would be for users to use  [statsmodels](https://www.statsmodels.org/stable/about.html#about-statsmodels). 
However, adding these functions to Scikit-learn would make it easier for users to calculate log-likelihood and null log-likelihood within the Scikit-learn ecosystem and would provide a standardized implementation. 

### Additional context

_No response_

COMMENT:
I think the reason for this may be that there are [different approaches to computing pseudo R-squared](https://en.wikipedia.org/wiki/Pseudo-R-squared). Moreover, different pseudo-R-squared measures can have different interpretations and assumptions, which may not always apply in a particular context.

However, since sci-kit learn already has [r2_score](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.r2_score.html), IMO this library should also have pseudo R-squared for logistic regression (allowing the user to choose from [indices](https://en.wikipedia.org/wiki/Pseudo-R-squared#:~:text=Likelihood%20ratio%20R2,McFadden%20R2McF)) for consistency. 
What do you think?

I'd be more than happy to work on it.

Labels: New Feature, module:linear_model, module:metrics, Needs Decision - Include Feature