https://github.com/juliaai/scientifictypes.jl
An API for dispatching on the "scientific" type of data instead of the machine type
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 8 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
An API for dispatching on the "scientific" type of data instead of the machine type
Basic Info
Statistics
- Stars: 99
- Watchers: 8
- Forks: 9
- Open Issues: 13
- Releases: 46
Topics
Metadata Files
README.md
ScientificTypes.jl
| Linux | Coverage | Documentation |
| :-----------: | :------: | :-----------: |
| |
|
This package makes a distinction between machine type and scientific type of a Julia object:
The machine type refers to the Julia type being used to represent the object (for instance,
Float64).The scientific type is one of the types defined in ScientificTypesBase.jl reflecting how the object should be interpreted (for instance,
ContinuousorMulticlass).
Contents
Installation
julia
using Pkg
Pkg.add("ScientificTypes")
Who is this repository for?
- developers of statistical and scientific software who want to articulate their data type requirements in a generic, purpose-oriented way, and who are furthermore happy to adopt an existing convention about what data types should be used for what purpose (a convention first developed for the MLJ ecosystem, but useful in a general context)
What's provided here?
The module ScientificTypes defined in this repo rexports the
scientific types and associated methods defined in ScientificTypesBase.jl
and provides:
a collection of
scitypedefinitions that articulate a default convention.a
coercefunction, for changing machine types to reflect a specified scientific interpretation (scientific type)an
autotypefuction for "guessing" the intended scientific type of data
Very quick start
For more information and examples please refer to the manual.
julia
using ScientificTypes, DataFrames
X = DataFrame(
a = randn(5),
b = [-2.0, 1.0, 2.0, missing, 3.0],
c = [1, 2, 3, 4, 5],
d = [0, 1, 0, 1, 0],
e = ['M', 'F', missing, 'M', 'F'],
)
sch = schema(X)
will print
┌───────┬────────────────────────────┬─────────────────────────┐
│ names │ scitypes │ types │
├───────┼────────────────────────────┼─────────────────────────┤
│ a │ Continuous │ Float64 │
│ b │ Union{Missing, Continuous} │ Union{Missing, Float64} │
│ c │ Count │ Int64 │
│ d │ Count │ Int64 │
│ e │ Union{Missing, Unknown} │ Union{Missing, Char} │
└───────┴────────────────────────────┴─────────────────────────┘
Detail is obtained in the obvious way; for example:
julia
julia> sch.names
(:a, :b, :c, :d, :e)
To specify that instead b should be regared as Count, and that both d and e are Multiclass, we use the coerce function:
julia
Xc = coerce(X, :b=>Count, :d=>Multiclass, :e=>Multiclass)
schema(Xc)
which prints
``` ┌───────┬───────────────────────────────┬────────────────────────────────────────────────┐ │ names │ scitypes │ types │ ├───────┼───────────────────────────────┼────────────────────────────────────────────────┤ │ a │ Continuous │ Float64 │ │ b │ Union{Missing, Count} │ Union{Missing, Int64} │ │ c │ Count │ Int64 │ │ d │ Multiclass{2} │ CategoricalValue{Int64, UInt32} │ │ e │ Union{Missing, Multiclass{2}} │ Union{Missing, CategoricalValue{Char, UInt32}} │ └───────┴───────────────────────────────┴────────────────────────────────────────────────┘
```
Acknowledgements and history
ScientificTypes is based on code from MLJScientificTypes.jl (now deprecated) and in particular builds on contributions of Anthony Blaom (@ablaom), Thibaut Lienart (@tlienart), Samuel Okon (@OkonSamuel), and others not recorded in the ScientificTypes commit history.
ScientificTypes.jl 2.0 implements the DefaultConvention, which
coincides with the deprecated MLJ convention of
MLJScientificTypes.jl
0.4.8. The code at ScientificTypes 1.1.2 (which defined only the API)
became
ScientificTypesBase.jl
1.0.
Owner
- Name: JuliaAI
- Login: JuliaAI
- Kind: organization
- Website: https://github.com/alan-turing-institute/MLJ.jl
- Repositories: 47
- Profile: https://github.com/JuliaAI
Home for repositories of the MLJ (Machine Learning in Julia) project
GitHub Events
Total
- Release event: 1
- Watch event: 3
- Issue comment event: 13
- Push event: 7
- Pull request review event: 1
- Pull request event: 12
- Fork event: 1
- Create event: 5
Last Year
- Release event: 1
- Watch event: 3
- Issue comment event: 13
- Push event: 7
- Pull request review event: 1
- Pull request event: 12
- Fork event: 1
- Create event: 5
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Anthony D. Blaom | a****m@g****m | 186 |
| Thibaut Lienart | l****b@m****m | 76 |
| Júlio Hoffimann | j****n@g****m | 10 |
| OkonSamuel | o****0@g****m | 10 |
| Dilum Aluthge | d****m@a****m | 4 |
| github-actions[bot] | 4****] | 1 |
| fkiraly | f****y@u****k | 1 |
| Felix Cremer | f****r@d****e | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 37
- Total pull requests: 79
- Average time to close issues: 3 months
- Average time to close pull requests: 4 days
- Total issue authors: 11
- Total pull request authors: 8
- Average comments per issue: 4.49
- Average comments per pull request: 1.16
- Merged pull requests: 69
- Bot issues: 0
- Bot pull requests: 7
Past Year
- Issues: 2
- Pull requests: 11
- Average time to close issues: N/A
- Average time to close pull requests: 20 minutes
- Issue authors: 2
- Pull request authors: 3
- Average comments per issue: 0.5
- Average comments per pull request: 0.45
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 4
Top Authors
Issue Authors
- ablaom (22)
- juliohm (4)
- DilumAluthge (2)
- tlienart (2)
- dom-linkevicius (1)
- igibek (1)
- EssamWisam (1)
- OkonSamuel (1)
- mtsch (1)
- ParadaCarleton (1)
- JuliaTagBot (1)
Pull Request Authors
- ablaom (52)
- tlienart (13)
- github-actions[bot] (7)
- OkonSamuel (2)
- juliohm (2)
- DilumAluthge (1)
- abhro (1)
- felixcremer (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 1,369 total
- Total dependent packages: 30
- Total dependent repositories: 0
- Total versions: 46
juliahub.com: ScientificTypes
An API for dispatching on the "scientific" type of data instead of the machine type
- Documentation: https://docs.juliahub.com/General/ScientificTypes/stable/
- License: MIT
-
Latest release: 3.1.1
published 12 months ago
Rankings
Dependencies
- julia-actions/setup-julia latest composite
- JuliaRegistries/TagBot v1 composite
- actions/cache v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite