Skip to content

Commit

Permalink
Merge branch 'dev-v0.9.1' into definitions/michele
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele21 committed Aug 17, 2023
2 parents 3fa3cee + f33875b commit f564d91
Show file tree
Hide file tree
Showing 94 changed files with 8,668 additions and 5,395 deletions.
12 changes: 7 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
freebsd_instance:
image: freebsd-12-0-release-amd64
image_family: freebsd-13-1
task:
name: FreeBSD
artifacts_cache:
folder: ~/.julia/artifacts
env:
JULIA_VERSION: 1.0
JULIA_VERSION: 1.6
JULIA_VERSION: nightly
matrix:
- JULIA_VERSION: 1.9
- JULIA_VERSION: 1
- JULIA_VERSION: nightly
allow_failures: $JULIA_VERSION == 'nightly'
install_script:
- sh -c "$(fetch https://raw.githubusercontent.com/ararslan/CirrusCI.jl/master/bin/install.sh -o -)"
build_script:
- cirrusjl build
test_script:
- cirrusjl test
coverage_script:
- cirrusjl coverage codecov coveralls
- cirrusjl coverage codecov
36 changes: 32 additions & 4 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,42 @@ on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
- name: Check if Julia is already available in the PATH
id: julia_in_path
run: which julia
continue-on-error: true
- name: Install Julia, but only if it is not already available in the PATH
uses: julia-actions/setup-julia@v1
with:
version: '1.9'
arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: "Add the General registry via Git"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
name = "CompatHelper"
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
version = "3"
Pkg.add(; name, uuid, version)
shell: julia --color=yes {0}
- name: "Run CompatHelper"
run: |
import CompatHelper
CompatHelper.main()
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
22 changes: 22 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Documentation
on:
push:
branches:
- main
tags: '*'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.9'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
run: julia --project=docs/ docs/make.jl
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Julia 1.8.0
- name: Set up Julia 1.9.0
uses: julia-actions/setup-julia@v1
with:
version: "1.8.0"
version: "1.9.0"
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
Expand Down
39 changes: 36 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
name = "SoleModels"
uuid = "4249d9c7-3290-4ddd-961c-e1d3ec2467f8"
authors = ["Eduard I. STAN", "Giovanni PAGLIARINI"]
version = "0.1.0"
authors = ["Michele GHIOTTI", "Giovanni PAGLIARINI", "Eduard I. STAN"]
version = "0.2.4"

[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
ComputedFieldTypes = "459fdd68-db75-56b8-8c15-d717a790f88e"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
Lazy = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Expand All @@ -20,10 +27,36 @@ SoleData = "123f1ae1-6307-4526-ab5b-aab3a92a2b8c"
SoleLogics = "b002da8f-3cb3-4d91-bbe3-2953433912b5"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
ThreadSafeDicts = "4239201d-c60e-5e0a-9702-85d713665ba7"
UniqueVectors = "2fbcfb34-fd0c-5fbb-b5d7-e826d8f5b0a9"
ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea"

[compat]
BenchmarkTools = "1"
CSV = "0.10.11"
CategoricalArrays = "0.10.8"
DataFrames = "1.3"
DataStructures = "0.18"
FillArrays = "1"
FunctionWrappers = "1"
Graphs = "1.8.0"
HTTP = "1.9.14"
Lazy = "0.15.1"
MLJBase = "0.21.11"
MLJModelInterface = "1.8.0"
ProgressMeter = "1"
Reexport = "1"
Revise = "3"
SoleBase = "0.11"
SoleData = "0.10.1"
SoleLogics = "0.4.8"
StatsBase = "0.33"
Suppressor = "0.2"
Tables = "1.10.1"
ThreadSafeDicts = "0.1.0"
UniqueVectors = "1.2.0"
ZipFile = "0.10.1"
julia = "1"

[extras]
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# *SoleModels.jl* – Symbolic Learning Models
<div align="center"><a href="https://github.com/aclai-lab/Sole.jl"><img src="logo.png" alt="" title="This package is part of Sole.jl" width="200"></a></div>

# SoleModels.jl – Symbolic Learning Models

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://aclai-lab.github.io/SoleModels.jl/stable)
[![Build Status](https://api.cirrus-ci.com/github/aclai-lab/SoleModels.jl.svg?branch=main)](https://cirrus-ci.com/github/aclai-lab/SoleModels.jl)
Expand All @@ -11,8 +13,8 @@

*SoleModels.jl* defines the building blocks of *symbolic* modeling and learning.
It features:
- Definitions for symbolic models (decision trees/forests, rules, etc.);
- Optimized data structures, useful when learning models from datasets;
- Definitions for symbolic models (decision trees/forests, rules, branches, etc.);
- Optimized data structures, useful when learning models from machine learning datasets;
- Support for mixed, neuro-symbolic computation.

These definitions provide a unified base for implementing symbolic algorithms, such as:
Expand All @@ -24,15 +26,16 @@ These definitions provide a unified base for implementing symbolic algorithms, s

### Basic models:

- Final models: wrapping native Julia computation (e.g., constants, functions);
- Leaf models: wrapping native Julia computation (e.g., constants, functions);
- Rules: structures with `IF antecedent THEN consequent END` semantics;
- Branches: structures with `IF antecedent THEN pos_consequent ELSE neg_consequent END` semantics.

Remember:
- An antecedent is any *condition* that can be checked on a machine learning *instance*, yielding a `true/false` value;
- A consequent is... anything you want, really, even another model (spoiler: a Branch with Branch consequents is a Decision Tree 😉).
- An antecedent is a logical formula that can be checked on a logical interpretation (that is, an *instance* of a symbolic learning dataset), yielding a truth value (e.g., `true/false`);
- A consequent is another model, for example, a (final) constant model or branch to be applied.

More specifically, antecedents can be *logical formulas* and, in such case, the symbolic models
Within this framework, a decision tree is no other than a branch with branch and final consequents.
NoteThat antecedents can consist of *logical formulas* and, in such case, the symbolic models
are can be applied to *logical interpretations*.
For more information, refer to [*SoleLogics.jl*](https://github.com/aclai-lab/SoleLogics.jl), the underlying logical layer.

Expand Down
4 changes: 2 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- struct EnsambleModel (with parametrized aggregation) and DecisionForest
- PatchModel, a closed model providing a default consequent to an open model
struct EnsambleModel (with parametrized aggregation) and DecisionForest
PatchModel, a closed model providing a default consequent to an open model
Loading

0 comments on commit f564d91

Please sign in to comment.