alan-turing-institute / TimeSeriesClassification.jl

Machine Learning with Time Series in Julia
MIT License
27 stars 5 forks source link

Improve test coverage #10

Open ablaom opened 4 years ago

ablaom commented 4 years ago

This is currently at 9%. I would say that until coverage is above 70%, adding tests should take priority over adding functionality.

aa25desh commented 4 years ago

Unit Tests

Integration tests

aa25desh commented 4 years ago

Remaining

There are some extra functions in utils.jl which are not in use as of now.

@ablaom for Integration tests I have added check Accuracy > value or should we use predict with random number to get reoccurring output?

Do we need tests for data loading functions?

ablaom commented 4 years ago

Looking good. 60% is great boost 🎉

@ablaom for Integration tests I have added check Accuracy > value or should we use predict with random number to get reoccurring output?

The best tests might be a very simple example where you can work the answer out by hand and check for approximate equality (isapprox or ≈). But this can often be difficult. That's why it's good to break down your algorithm into lots of smaller functions that you can do this for. So, I think Accuracy > value is okay, where value could be some baseline model prediction (eg, constant, feature-independent, prediction).

You can use the codecov tool to find where coverage is low, then decide which of those areas should be prioritized. Follow the links from the codecov .

ablaom commented 4 years ago

Do we need tests for data loading functions?

Couldn't hurt. Start with those with the most complex logic.

ablaom commented 3 years ago
  • [x] select_sort

  • [x] InvFeatureGen

Where are these? I could not find them.