Comments (1)
Possible test for StepHistorical:
def test_step(example_df):
rec = Recipe(example_df, ['y'], ['x1', 'x2'], ['id'])
rec.add_step(StepHistorical(sel=all_of(['x1', 'x2']), fun='min', suffix='min'))
rec.add_step(StepHistorical(sel=all_of(['x1', 'x2']), fun='max', suffix='max'))
rec.add_step(StepHistorical(sel=all_of(['x1', 'x2']), fun='mean', suffix='mean'))
rec.add_step(StepHistorical(sel=all_of(['x1', 'x2']), fun='median', suffix='median'))
rec.add_step(StepHistorical(sel=all_of(['x1', 'x2']), fun='count', suffix='count'))
rec.add_step(StepHistorical(sel=all_of(['x1', 'x2']), fun='var', suffix='var'))
df = rec.bake()
assert df['x1_min'].iloc[-1] == df['x1'].loc[df['id'] == 2].min()
assert df['x2_max'].iloc[-1] == df['x2'].loc[df['id'] == 2].max()
assert df['x2_mean'].iloc[-1] == df['x2'].loc[df['id'] == 2].mean()
assert df['x1_median'].iloc[-1] == df['x1'].loc[df['id'] == 2].median()
assert df['x1_count'].iloc[-1] == df['x1'].loc[df['id'] == 2].count()
assert df['x2_var'].iloc[-1] == df['x2'].loc[df['id'] == 2].var()
from yaib.
Related Issues (20)
- Rethink folder structure HOT 3
- Metric calculation HOT 2
- Include cv repetition in log_dir HOT 1
- Reduce Metric Files HOT 2
- Preprocessing eICU leads to an error HOT 1
- Potential memory leak in preprocessing HOT 1
- Ensure hyperparameter tuning reproducibility HOT 1
- Create data interface HOT 1
- `icu-benchmarks train` raises `pkg_resources.DistributionNotFound` on osx-arm64 HOT 2
- Check if order is preserved HOT 3
- `evaluate` currently doesn't work
- Default command in readme has wrong syntax HOT 2
- Debug flag broken HOT 1
- 'x is not a list '-- YAIB-cohorts HOT 3
- Add cross-correlation as imputation evaluation metric
- inconsistency between different preprocessing pipelines HOT 2
- Fix docstrings
- Create website or wiki for user manual HOT 1
- Bayesian hyperparameter tuning warning
- Model Calibration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yaib.