Skip to content

Commit

Permalink
Only continuous input allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Jul 4, 2023
1 parent 1ea518f commit dbf540b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/MLJInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,9 @@ MMI.package_license(::Type{<:AbstractSRRegressor}) = "Apache-2.0"
MMI.is_pure_julia(::Type{<:AbstractSRRegressor}) = true
MMI.is_wrapper(::Type{<:AbstractSRRegressor}) = false

MMI.input_scitype(::Type{SRRegressor}) = MMI.Table(Union{MMI.Continuous,MMI.Count})
MMI.input_scitype(::Type{SRRegressor}) = MMI.Table(MMI.Continuous)
function MMI.target_scitype(::Type{SRRegressor})
return Union{
MMI.Table(Union{MMI.Continuous,MMI.Count}),
AbstractVector{<:Union{MMI.Continuous,MMI.Count}},
}
return Union{MMI.Table(MMI.Continuous),AbstractVector{<:MMI.Continuous}}
end
MMI.supports_weights(::Type{SRRegressor}) = true
MMI.human_name(::Type{SRRegressor}) = "Symbolic Regression via Evolutionary Search"
Expand Down
2 changes: 1 addition & 1 deletion src/Options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function Options end
una_constraints=nothing,
progress::Bool=true,
terminal_width::Union{Nothing,Integer}=nothing,
optimizer_algorithm::String="BFGS",
optimizer_algorithm::AbstractString="BFGS",
optimizer_nrestarts::Integer=2,
optimizer_probability::Real=0.14,
optimizer_iterations::Union{Nothing,Integer}=nothing,
Expand Down
4 changes: 2 additions & 2 deletions src/OptionsStruct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ function Base.print(io::IO, options::Options)
fieldname in fieldnames(Options) if fieldname [:operators, :nuna, :nbin]
],
", ",
)
* ")",
) *
")",
)
end
Base.show(io::IO, ::MIME"text/plain", options::Options) = Base.print(io, options)
Expand Down

0 comments on commit dbf540b

Please sign in to comment.