Skip to content

Commit

Permalink
Added some basic structure
Browse files Browse the repository at this point in the history
  • Loading branch information
velezbeltran committed Feb 13, 2024
1 parent 246cc65 commit 2aebae2
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/treeffuser/sampling.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Something like here: https://github.com/yang-song/score_sde_pytorch/blob/main/sampling.py
"""
16 changes: 16 additions & 0 deletions src/treeffuser/score_modesl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
This file should contain a general abstraction of the score models and
should function as a wrapper for different models we might want to use.
tThe idea is to "hide" the particular tree we want to use so that
we can easily switch between different models without having to change
the rest of the code.
"""

import abc


class ScoreModel(abc.ABC):
@abc.abstractmethod
def score(self, data):
pass
3 changes: 3 additions & 0 deletions src/treeffuser/sde.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Similar to https://github.com/yang-song/score_sde_pytorch/blob/main/sde_lib.py
"""
30 changes: 30 additions & 0 deletions src/treeffuser/treeffusser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""
This should be the main file corresponding to the project.
"""

from sklearn.base import BaseEstimator


class Treeffuser(BaseEstimator):

def __init__(self, *args, **kwargs):
pass

def fit(self, X, y):
pass

def predict(self, X):
pass

def sample(self, X):
pass

def likelihood(self, X, y):
"""
Something that computes the log-likelihood of the model.
"""

def pred_distribution(self, X):
"""
Maybe the CDF?
"""

0 comments on commit 2aebae2

Please sign in to comment.