-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User aggregators #95
Open
nmtiwari
wants to merge
31
commits into
master
Choose a base branch
from
user_Aggregators
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,683
−45
Open
User aggregators #95
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
917e118
Merge branch 'master' into boa_evaluator
a6e1c3d
Initial commit for User Defined Aggregation support
a31e918
Fixing bug : Only one user defined aggregator runs in the presence of…
e4b0f05
REmoving unnecessary prints
ba6b2ff
Fixing a bug: Filter non aggregator functions from list
1829489
Merge branch 'boa_evaluator' into user_Aggregators
de27178
Fixing a test case as code generation has change.
a7fd7b6
Updating latest code generation string template.
81e8f37
Fixing bug in UserDefinedCode generating process. Fixing fullyqualifi…
2972425
adding naive bayes exmaple using user defined aggragation
b161ab2
Allowing creation of arrays of nested and complex types
81af781
Adding capability to convert a tuple into array if possible. If tuple…
3295b15
code for matrix transpose, inverse, summation and substraction suppor…
a05a385
Adding machine learning examples codes in test directory
ff5b37b
Adding matrix operations
6b6aa9f
Fixing bug in getCol method in matrix operations
0da11ef
linear regression optimized and unoptimized code
737060d
adding neural network withour back propogation
db0a04f
Changes in MatrixOperations and Adding Print facility for debugging H…
98eb3ac
removing merge conflicts
fb23150
adding back propogation in neural
491adfc
adding pca
72711ce
adding optimized pca
edf12ff
adding new machine learning algorCithms
656775d
Adding changes to support options as user defined aggregations
e691a5b
Changes to support serialization of ml model in Boa
390fc86
Storing the class as part of model
6ecf209
Adding serialization support for the model using simple json
fec8ee8
adding support for loading ml model
739eb3c
Allowing options in user defined aggregator class
459000f
adding training model usage
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adding changes to support options as user defined aggregations
- Loading branch information
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,6 +182,7 @@ public void visit(final VarDeclStatement n) { | |
UserDefinedAgg.Builder function = UserDefinedAggregators.findByUserGivenName(((OutputType)n.getType()).getId().getToken()); | ||
if(function != null) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems odd to set this here - shouldnt it already be set when it is found and returned? |
||
function.isAggregator(true); | ||
function.setAggregatorOptionParamType(((OutputType)n.getType()).getParams()); | ||
} | ||
return; | ||
} | ||
|
@@ -839,6 +840,7 @@ public void visit(final Factor n) { | |
String accept = ""; | ||
abortGeneration = false; | ||
|
||
n.env.setOperandType(n.getOperand().type); | ||
if (!(n.getOp(0) instanceof Call)) { | ||
n.getOperand().accept(this); | ||
n.env.setOperandType(n.getOperand().type); | ||
|
@@ -1370,6 +1372,18 @@ public void visit(final VarDeclStatement n) { | |
n.getInitializer().accept(this); | ||
function.lambdaInit(code.removeLast()); | ||
} | ||
if(n.getType() instanceof OutputType) { | ||
function = UserDefinedAggregators.findByUserGivenName(((OutputType) n.getType()).getId().getToken()); | ||
if(function != null) { | ||
int counter = 0; | ||
for(VarDeclStatement stmt: ((OutputType) n.getType()).getParams()) { | ||
stmt.accept(this); | ||
String[] argCode = code.removeLast().split("="); | ||
function.addAggregatorOptionParamId(argCode[0], counter++); | ||
function.addAggregatorOptionParamInitializer(argCode[1]); | ||
} | ||
} | ||
} | ||
code.add(""); | ||
return; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this class needs a proper name:
UserDefinedAggregator