TSCV icon indicating copy to clipboard operation
TSCV copied to clipboard

add CombinatorialGapKFold

Open aldder opened this issue 3 years ago • 3 comments

From "Advances in Financial Machine Learning" book by Marcos López de Prado the implemented version of Combinatorial Cross Validation with Purging and Embargoing

image

explaining video: https://www.youtube.com/watch?v=hDQssGntmFA

aldder avatar Feb 01 '22 17:02 aldder

Hello @aldder! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 451:9: F841 local variable 'gap_before' is assigned to but never used Line 451:21: F841 local variable 'gap_after' is assigned to but never used

Line 672:80: E501 line too long (102 > 79 characters) Line 678:80: E501 line too long (103 > 79 characters) Line 684:80: E501 line too long (115 > 79 characters) Line 690:80: E501 line too long (119 > 79 characters) Line 698:80: E501 line too long (106 > 79 characters)

Comment last updated at 2022-02-11 12:19:56 UTC

pep8speaks avatar Feb 01 '22 17:02 pep8speaks

Hi @aldder , please try to add some test cases in the test_split.py file.

WenjieZ avatar Feb 05 '22 03:02 WenjieZ

Codecov Report

Merging #41 (c7b2bed) into master (c05265a) will increase coverage by 0.37%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
+ Coverage   97.51%   97.88%   +0.37%     
==========================================
  Files           3        3              
  Lines         643      756     +113     
==========================================
+ Hits          627      740     +113     
  Misses         16       16              
Impacted Files Coverage Δ
tscv/__init__.py 100.00% <100.00%> (ø)
tscv/_split.py 94.50% <100.00%> (+0.72%) :arrow_up:
tscv/tests/test_split.py 99.78% <100.00%> (+0.04%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c05265a...c7b2bed. Read the comment docs.

codecov[bot] avatar Feb 07 '22 07:02 codecov[bot]