Comments (4)
commit 40f28e4
Since overloading operator[] could not guarantee different return types hence instead of stack['f']
or stack['b']
, stack.f
and stack.b
are supported.
from feat.
Some questions and comments on 40f28e4 :
- Can you do
ArrayXb x = stack.pop()
and have it return an element from the correct stack? - It would be nice to wrap the stack/node check into a Stack class method. so that
(stack.f.size() >= n->arity['f'] && stack.b.size() >= n->arity['b'])
would become something likestack.check(n)
and you could define
bool Stack::check(Node & n) { return stack.f.size() >= n->arity['f'] && stack.b.size() >= n->arity['b'];}
then we could update the check function in one place as we add /change the stacks. - the stack name "l" is not nice .. it's hard to read lower case l names. please rename it to 'z' or 'long'.
- for most simple functions (like add) we can simplify the code from
ArrayXd x2 = stack.f.pop();
ArrayXd x1 = stack.f.pop();
stack.f.push(limited(x1 + x2));
to stack.f.push(limited(stack.f.pop() + stack.f.pop()));
from feat.
commit 409c0dd
-
ArrayXb x = stack.pop()
cannot be implemented to return element from correct stack as we need to specify return type in pop() function definition which cannot be generic. Thats why implementedstack.f
,stack.b
andstack.z
. Let me know if you can think of a way this can be improved. -
stack.check(arity)
method implemented. Instead of using the wholeNode&
have usednode->arity
data member reference as parameter as then stack class would depend on node class and node already is dependent on stack class which would create a cyclic dependency. -
replaced
stack.l
withstack.z
everywhere -
simplified nodes'
evaluate()
andeval_eqn()
from feat.
PR #94 merges this into master
from feat.
Related Issues (20)
- 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
- `undefined reference to `memcpy@GLIBC_2.14'` HOT 2
- cannot import name 'convergence' from 'convergence'
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.