Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDS #205

Merged
merged 21 commits into from
Nov 15, 2023
Merged

MDS #205

Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 0 additions & 182 deletions lib/scholar/covariance.ex

This file was deleted.

18 changes: 18 additions & 0 deletions lib/scholar/linear/isotonic_regression.ex
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,24 @@ defmodule Scholar.Linear.IsotonicRegression do
}
end

@doc """
Preprocesses the `model` for prediction.

Returns an updated `model`. This is a special version of `preprocess/1` that
does not trim duplicates so it can be used in defns. It is not recommended
to use this function directly.
"""
defn special_preprocess(model) do
msluszniak marked this conversation as resolved.
Show resolved Hide resolved
%__MODULE__{
model
| preprocess:
Scholar.Interpolation.Linear.fit(
model.x_thresholds,
model.y_thresholds
)
}
end

deftransform check_preprocess(model) do
if model.preprocess == {} do
raise ArgumentError,
Expand Down
Loading