Skip to content

Commit

Permalink
uses StatsAPI; nothing as parameter in mutate
Browse files Browse the repository at this point in the history
  • Loading branch information
sadit committed May 5, 2022
1 parent 611bfa5 commit a2e46fe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TextClassification"
uuid = "8e067cb0-742a-4f90-93f9-f1fa01b385ec"
authors = ["Eric S. Tellez <donsadit@gmail.com>"]
version = "0.5.1"
version = "0.5.2"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand All @@ -16,18 +16,20 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SearchModels = "0e966ebe-b704-4a65-8279-db954bfe5da0"
SimilaritySearch = "053f045d-5466-53fd-b400-a066f88fe02a"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
TextSearch = "7f6f6c8a-3b03-11e9-223d-e7d88259bd6c"

[compat]
CategoricalArrays = "0.8, 0.9, 0.10"
KNearestCenters = "0.7"
InvertedFiles = "0.3"
KNearestCenters = "0.7"
LIBLINEAR = "0.6.0"
MLDataUtils = "0.5.0"
Parameters = "0.12"
SearchModels = "0.3"
SimilaritySearch = "0.8"
StatsBase = "0.32.0, 0.33"
StatsAPI = "1.2, 1.3"
TextSearch = "0.11"
julia = "1.6"
1 change: 1 addition & 0 deletions src/TextClassification.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This file is part of TextClassification.jl

module TextClassification
import StatsAPI: predict, fit
using SimilaritySearch, TextSearch, SearchModels
import SearchModels: combine, combine_select, mutate, config_type
using Parameters, CategoricalArrays, InvertedFiles
Expand Down
4 changes: 2 additions & 2 deletions src/textmodelspace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ function combine(a::VectorModelConfig, b::VectorModelConfig)
end

function mutate(space::VectorModelConfigSpace, c::VectorModelConfig, iter)
mindocs = SearchModels.scale(c.mindocs; space.scale_mindocs...)
keeptop = SearchModels.scale(c.keeptop; space.scale_keeptop...)
mindocs = space.scale_mindocs === nothing ? c.mindocs : SearchModels.scale(c.mindocs; space.scale_mindocs...)
keeptop = space.scale_keeptop === nothing ? c.keeptop : SearchModels.scale(c.keeptop; space.scale_keeptop...)
lw = SearchModels.change(c.local_weighting, space.local_weighting, p1=0.3)
gw = SearchModels.change(c.global_weighting, space.global_weighting, p1=0.3)

Expand Down

2 comments on commit a2e46fe

@sadit
Copy link
Owner Author

@sadit sadit commented on a2e46fe May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/59722

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.2 -m "<description of version>" a2e46fefd6868a6afc5ad07db3bbfdec93d15ca8
git push origin v0.5.2

Please sign in to comment.