Skip to content

Commit

Permalink
proper formatting of predict docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaquinIglesiasTurina committed Jul 28, 2024
1 parent af993d7 commit 88066fd
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lib/scholar/linear/bayesian_ridge_regression.ex
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ defmodule Scholar.Linear.BayesianRidgeRegression do

@doc """
Makes predictions with the given `model` on input `x`.
Output predictions have shape {n_samples} when train target is shaped either {n_samples} or {n_samples, 1}.
Output predictions have shape `{n_samples}` when train target is shaped either `{n_samples}` or `{n_samples, 1}`.
## Examples
Expand Down
3 changes: 2 additions & 1 deletion lib/scholar/linear/isotonic_regression.ex
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ defmodule Scholar.Linear.IsotonicRegression do

@doc """
Makes predictions with the given `model` on input `x` and interpolating `function`.
Output predictions have shape {n_samples} when train target is shaped either {n_samples} or {n_samples, 1}.
Output predictions have shape `{n_samples}` when train target is shaped either `{n_samples}` or `{n_samples, 1}`.
Otherwise, predictions match train target shape.
## Examples
Expand Down
3 changes: 2 additions & 1 deletion lib/scholar/linear/linear_regression.ex
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ defmodule Scholar.Linear.LinearRegression do

@doc """
Makes predictions with the given `model` on input `x`.
Output predictions have shape {n_samples}, when train target is shaped either {n_samples} or {n_samples, 1}.
Output predictions have shape `{n_samples}` when train target is shaped either `{n_samples}` or `{n_samples, 1}`.
Otherwise, predictions match train target shape.
## Examples
Expand Down
3 changes: 2 additions & 1 deletion lib/scholar/linear/logistic_regression.ex
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ defmodule Scholar.Linear.LogisticRegression do

@doc """
Makes predictions with the given `model` on inputs `x`.
Output predictions have shape {n_samples}, when train target is shaped either {n_samples} or {n_samples, 1}.
Output predictions have shape `{n_samples}` when train target is shaped either `{n_samples}` or `{n_samples, 1}`.
## Examples
Expand Down
3 changes: 2 additions & 1 deletion lib/scholar/linear/polynomial_regression.ex
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ defmodule Scholar.Linear.PolynomialRegression do

@doc """
Makes predictions with the given `model` on input `x`.
Output predictions have shape {n_samples}, when train target is shaped either {n_samples} or {n_samples, 1}.
Output predictions have shape `{n_samples}` when train target is shaped either `{n_samples}` or `{n_samples, 1}`.
Otherwise, predictions match train target shape.
## Examples
Expand Down
3 changes: 2 additions & 1 deletion lib/scholar/linear/ridge_regression.ex
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ defmodule Scholar.Linear.RidgeRegression do

@doc """
Makes predictions with the given `model` on input `x`.
Output predictions have shape {n_samples}, when train target is shaped either {n_samples} or {n_samples, 1}.
Output predictions have shape `{n_samples}` when train target is shaped either `{n_samples}` or `{n_samples, 1}`.
Otherwise, predictions match train target shape.
## Examples
Expand Down
3 changes: 2 additions & 1 deletion lib/scholar/linear/svm.ex
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ defmodule Scholar.Linear.SVM do

@doc """
Makes predictions with the given model on inputs `x`.
Output predictions have shape {n_samples}, when train target is shaped either {n_samples} or {n_samples, 1}.
Output predictions have shape `{n_samples}` when train target is shaped either `{n_samples}` or `{n_samples, 1}`.
## Examples
iex> x = Nx.tensor([[1.0, 2.0], [3.0, 2.0], [4.0, 7.0]])
Expand Down

0 comments on commit 88066fd

Please sign in to comment.