Skip to content

Commit

Permalink
latest comment fixes from 10/25
Browse files Browse the repository at this point in the history
  • Loading branch information
pranmod01 committed Oct 26, 2024
1 parent 71cfe4c commit b0fcfe4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/nemos/glm.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class GLM(BaseRegressor):
--------
>>> import nemos as nmo
>>> # define simple GLM model
>>> # define single neuron GLM model
>>> model = nmo.glm.GLM()
>>> print("Regularizer type: ", type(model.regularizer))
Regularizer type: <class 'nemos.regularizer.UnRegularized'>
Expand Down Expand Up @@ -330,7 +330,7 @@ def predict(self, X: DESIGN_INPUT_TYPE) -> jnp.ndarray:
--------
>>> # example input
>>> import numpy as np
>>> X, y = np.random.normal(size=(10, 2)), np.random.uniform(size=10)
>>> X, y = np.random.normal(size=(10, 2)), np.random.poisson(size=10)
>>> # define and fit a GLM
>>> import nemos as nmo
Expand Down Expand Up @@ -445,7 +445,7 @@ def score(
--------
>>> # example input
>>> import numpy as np
>>> X, y = np.random.normal(size=(10, 2)), np.random.uniform(size=10)
>>> X, y = np.random.normal(size=(10, 2)), np.random.poisson(size=10)
>>> import nemos as nmo
>>> model = nmo.glm.GLM()
Expand All @@ -454,6 +454,9 @@ def score(
>>> # get model score
>>> log_likelihood_score = model.score(X, y)
>>> # get a pseudo-R2 score
>>> pseudo_r2_score = model.score(X, y, score_type='pseudo-r2-McFadden')
Notes
-----
The log-likelihood is not on a standard scale, its value is influenced by many factors,
Expand Down

0 comments on commit b0fcfe4

Please sign in to comment.