Skip to content

Commit c4145a4

Browse files
authored
Merge pull request #69 from invenia/rf/simplify
Simplify Imputor API
2 parents 9adde36 + 6c3b6d8 commit c4145a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4328
-1872
lines changed

.travis.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,28 @@ language: julia
33
os:
44
- linux
55
- osx
6+
env:
7+
- DATADEPS_ALWAYS_ACCEPT=true
68
julia:
79
# 1.0 should also work, but Pkg.test hit some chmod issues on 1.0 in docker containers
810
- 1.3
11+
- 1.5
912
- nightly
1013
notifications:
1114
email: false
12-
matrix:
13-
fast_finish: true
14-
allow_failures:
15-
- julia: nightly
1615
# uncomment the following lines to override the default test script
1716
#script:
1817
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
1918
# - julia -e 'Pkg.clone(pwd()); Pkg.build("Impute"); Pkg.test("Impute"; coverage=true)'
2019
after_success:
2120
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
2221
jobs:
22+
fast_finish: true
23+
allow_failures:
24+
- julia: nightly
2325
include:
2426
- stage: "Documentation"
25-
julia: 1.0
27+
julia: 1.5
2628
os: linux
2729
script:
2830
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'

Project.toml

+11-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ authors = ["Invenia Technical Computing"]
44
version = "0.6.0"
55

66
[deps]
7+
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
8+
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
9+
DataDeps = "124859b0-ceae-595e-8997-d05f6a7a8dfe"
710
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
811
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
912
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1013
Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
14+
NamedDims = "356022a1-0364-5f58-8944-0da4b18d706f"
1115
NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
1216
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1317
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
@@ -16,10 +20,14 @@ TableOperations = "ab02a1b2-a7df-11e8-156e-fb1833f50b87"
1620
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
1721

1822
[compat]
19-
AxisKeys = "0.1.5"
23+
AxisKeys = "0.1"
24+
BSON = "0.2"
25+
CSV = "0.6, 0.7"
26+
DataDeps = "0.7"
2027
Distances = "0.8, 0.9"
2128
IterTools = "1.2, 1.3"
2229
Missings = "0.4"
30+
NamedDims = "0.2"
2331
NearestNeighbors = "0.4"
2432
StatsBase = "0.32"
2533
TableOperations = "0.2"
@@ -33,8 +41,8 @@ Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
3341
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
3442
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
3543
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
36-
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
44+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3745
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3846

3947
[targets]
40-
test = ["AxisArrays", "AxisKeys", "Combinatorics", "DataFrames", "Dates", "Distances", "RDatasets", "Test"]
48+
test = ["AxisArrays", "AxisKeys", "Combinatorics", "DataFrames", "Dates", "Distances", "Documenter", "Test"]

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ julia> using Pkg; Pkg.add("Impute")
1414
## Quickstart
1515
Let's start by loading our dependencies:
1616
```julia
17-
julia> using DataFrames, RDatasets, Impute
17+
julia> using DataFrames, Impute
1818
```
1919

2020
We'll also want some test data containing missings to work with:
2121

2222
```julia
23-
julia> df = dataset("boot", "neuro")
23+
julia> df = Impute.dataset("test/table/neuro") |> DataFrame
2424
469×6 DataFrames.DataFrame
2525
│ Row │ V1 │ V2 │ V3 │ V4 │ V5 │ V6 │
2626
│ │ Float64⍰ │ Float64⍰ │ Float64 │ Float64⍰ │ Float64⍰ │ Float64⍰ │
@@ -46,7 +46,7 @@ julia> df = dataset("boot", "neuro")
4646
Our first instinct might be to drop all observations, but this leaves us too few rows to work with:
4747

4848
```julia
49-
julia> Impute.drop(df)
49+
julia> Impute.filter(df; dims=:rows)
5050
4×6 DataFrames.DataFrame
5151
│ Row │ V1 │ V2 │ V3 │ V4 │ V5 │ V6 │
5252
│ │ Float64 │ Float64 │ Float64 │ Float64 │ Float64 │ Float64 │

0 commit comments

Comments
 (0)