Skip to content

Commit

Permalink
add sig/fit.rbs
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhull committed Jun 15, 2024
1 parent d30bede commit 417b2a9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ target :lib do
check "lib/compsci/collatz.rb"
check "lib/compsci/elo.rb"
check "lib/compsci/fibonacci.rb"
check "lib/compsci/fit.rb"

# library "pathname" # Standard libraries
# library "strong_json" # Gems
Expand Down
14 changes: 14 additions & 0 deletions sig/fit.rbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module CompSci
module Fit
def self.constant: (Array[Numeric] xs, Array[Numeric] ys) ->
Array[Numeric]
def self.best: (Array[Numeric] xs, Array[Numeric] ys) -> Array[untyped]
def self.sigma: (Enumerable enum) ?{ (?) -> Numeric } -> Numeric
def self.error: (untyped xys) { (untyped) -> untyped } -> untyped
def self.logarithmic: (untyped xs, untyped ys) -> ::Array[untyped]
def self.linear: (untyped xs, untyped ys) -> ::Array[untyped]
def self.exponential: (untyped xs, untyped ys) -> ::Array[untyped]
def self.power: (untyped xs, untyped ys) -> ::Array[untyped]
def self.predict: (untyped model, untyped a, untyped b, untyped x) -> untyped
end
end

0 comments on commit 417b2a9

Please sign in to comment.