Comments (17)
see https://github.com/google/googletest
from feat.
a starting list of tests:
Fewtwo :
- 1. test setting functions in fewtwo correctly set data members
- 2. predict, transform, fit_predict and fit_transform return correct size vectors and matrices
- 3. fewtwo returns a perfect training mse on a linearly separable training set
Individual:
- 1. get_eqn returns a valid string expression
- 2. subtree grabs correct locations of subtree in a given program
- 3. check_dominance correctly predicts one individual dominating another
- 4. complexity() returns correct complexity
Population:
- 1. get_open_loc correctly returns location not in individuals.loc
- 2. individuals are accessible via [] operators
Node:
- 1. make sure evaluate function produces stacks with no infs or nan values. focus on edges cases, i.e. division by zero.
Parameters:
- 1. check that set functions work
- 2. make sure msg command works correctly with varying levels of verbosity
Evaluation:
- 1. assign_fit produces an expected output and correct mse for a given program
- 2. fitness produces an expected output and correct mse for a given population
- 3. out_ml produces correct size and expected output given an input matrix and target values. test with linear regression and decision tree.
- 4. check for nan outputs
Selection / SelectionOperator:
- 1. check that selection operators return correct number of selected parents
Variation:
- 1. crossover produces valid programs
- 2. mutation produces valid programs
(you can define a "valid" program as one whose total arity is satisfied when marching from beginning to end. see these tests
The tests form the first version of few here might provide some guidelines.
from feat.
done for
Fewtwo :
- test setting functions in fewtwo correctly set data members
note :- predict() and transform() functions are not available in fewtwo need to implement them
Individual:
- get_eqn returns a valid string expression (need to check if string is valid)
Node:
- make sure evaluate function produces stacks with no infs or nan values. focus on edges cases, i.e. division by zero. (need to do for nodevariable and nodeConstants(both binary and floating))
Issues faced :- need to move some attributes from private to public to test
from feat.
link for setting up google tests
from feat.
@tilakhere checkout https://github.com/lacava/fewtwo/blob/variation/src/population.h#L80 for an example of checking program validity. this should be re-incorporated as a unit test.
from feat.
cool.
from feat.
done for
Population:
- get_open_loc correctly returns location not in individuals.loc
NOTE :- guess we need to put some check or assert in this function so that its not being called for more than the number of locations in the vector)
- individuals are accessible via [] operators
Variation:
- crossover produces valid programs
- mutation produces valid programs
Parameters:
- check that set functions work
- make sure msg command works correctly with varying levels of verbosity
didn't commit them right now as there are some issues with fewtwo currently causing the tests to fail abnormally.
from feat.
with the current commit i'm getting the error
/code/fewtwo/tests$ make -C build
make: Entering directory '/code/fewtwo/tests/build'
make[1]: Entering directory '/code/fewtwo/tests/build'
make[2]: Entering directory '/code/fewtwo/tests/build'
Scanning dependencies of target runTests
make[2]: Leaving directory '/code/fewtwo/tests/build'
make[2]: Entering directory '/code/fewtwo/tests/build'
[ 50%] Building CXX object CMakeFiles/runTests.dir/gtest.cc.o
[100%] Linking CXX executable runTests
CMakeFiles/runTests.dir/gtest.cc.o: In function `__static_initialization_and_destruction_0(int, int)':
gtest.cc:(.text+0x1c0d7): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
gtest.cc:(.text+0x1c124): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
gtest.cc:(.text+0x1c171): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
gtest.cc:(.text+0x1c1be): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
gtest.cc:(.text+0x1c20b): undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
CMakeFiles/runTests.dir/gtest.cc.o:gtest.cc:(.text+0x1c258): more undefined references to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)' follow
collect2: error: ld returned 1 exit status
CMakeFiles/runTests.dir/build.make:95: recipe for target 'runTests' failed
make[2]: *** [runTests] Error 1
make[2]: Leaving directory '/code/fewtwo/tests/build'
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/runTests.dir/all' failed
make[1]: *** [CMakeFiles/runTests.dir/all] Error 2
make[1]: Leaving directory '/code/fewtwo/tests/build'
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory '/code/fewtwo/tests/build'
from feat.
nvm, i reinstalled google tests via the instructions and it works fine.
from feat.
note that I pushed some changes to reflect new data members in the Parameters class
from feat.
tests done for (commit fef5f65)
Individual :-
- subtree grabs correct locations of subtree in a given program
- check_dominance correctly predicts one individual dominating another (FAILING currently, I think this should have >= check instead of only > according to our discussion last week. Not sure and hence didnt make any changes to the code to confirm it)
- complexity() returns correct complexity
Evaluation
- assign_fit produces an expected output and correct mse for a given program
- out_ml produces correct size and expected output given an input matrix and target values. test with linear regression and decision tree.
NOTE :- out_ml is not working properly hence tests not running up correctly. Runs correctly maybe 1 time out of 20-30 tries. Throws segmentation fault (core dump) or Bus error (core dumped) sometimes.
Some error in converting eigen matrix and vectors to shogun
Evaluation.h line 146 and 147
auto features = some<CDenseFeatures<float64_t>>(SGMatrix<float64_t>(X));
auto labels = some(SGVector<float64_t>(y));
from feat.
what is the error?
from feat.
segmentation fault
from feat.
unit_test for assign_fit:
ind = Individual();
ind.loc = 0;
MatrixXd F(10,1);
for the regression case (params.classification = false)
yhat = 0,1,2,3,4,5,6,7,8,9
y = 0,0,0,0,0,0,0,0,0,0
assert (F.col(ind.loc) == [ 0., 1., 4., 9., 16., 25., 36., 49., 64., 81.])
assert ( ind.fitness = 28.5)
for classification (params.classification=true)
yhat = 0,1,2,3,4,5,6,7,8,9
y = 0,1,2,0,1,2,0,1,2,0
assert (F = [0, 0, 0, 1, 1, 1, 1, 1, 1, 1])
assert ( ind.fitness == 0.7)
from feat.
New tests added
Fewtwo :
- predict, transform, fit_predict and fit_transform return correct size vectors and matrices
Evaluation:
- assign_fit produces an expected output and correct mse for a given program
- check for nan outputs
Commit fc05833
from feat.
merged to master (b15c302)
from feat.
New test added
Selection / SelectionOperator:
check that selection operators return correct number of selected parents
commit ddd3731
from feat.
Related Issues (20)
- make conda package
- add FeatRegressor, FeatClassifier derived classes
- handle depth more accurately
- Custom function HOT 1
- segmentation fault in parallel mode HOT 7
- Logistic regression seems falling HOT 2
- Cartesian Genetic Prog HOT 3
- Memory leak in multiclass HOT 12
- What's the best development method for this package? HOT 2
- The document of install and example is loss. HOT 1
- Operator selection syntax/ issue HOT 8
- Feat.Predict(x) causing Segmentation fault HOT 1
- Propagate feature weights and offsets to leaves of equations when normalize=True
- Double decimal points in coefficient HOT 2
- ModuleNotFoundError: No module named 'feat.pyfeat' HOT 1
- Symbolic model does not evaluate to the same values as `predict` HOT 2
- Could not find id = 5257 in archive. HOT 1
- Installation error HOT 2
- ModuleNotFoundError: No module named 'feat.cyfeat' HOT 2
- will it work on windows comp? HOT 2
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 feat.