acherm / mmlg Goto Github PK
View Code? Open in Web Editor NEWmulti machine learning DSL
multi machine learning DSL
Translation of your Xtext grammar to Langium using https://github.com/TypeFox/xtext2langium
grammar Mmlg
import 'Terminals'
entry MMLModel infers MMLModel:
input=DataInput algorithm=MLChoiceAlgorithm ? formula=RFormula ? validation=Validation ?
;
DataInput infers DataInput:
'datainput' filelocation=STRING (parsingInstruction=CSVParsingConfiguration )?
;
CSVParsingConfiguration infers CSVParsingConfiguration:
"separator" sep=CSVSeparator
;
type CSVSeparator = ',' | ";";
CSVSeparator returns CSVSeparator:
CSVSeparator_COMMA | CSVSeparator_SEMI_COLON
;
CSVSeparator_COMMA returns string: ',' ;
CSVSeparator_SEMI_COLON returns string: ";" ;
MLChoiceAlgorithm infers MLChoiceAlgorithm:
'mlframework' framework=FrameworkLang 'algorithm' algorithm=MLAlgorithm
;
type FrameworkLang = "scikit-learn" | "R" | "Weka";
FrameworkLang returns FrameworkLang:
FrameworkLang_SCIKIT | FrameworkLang_R | FrameworkLang_JavaWeka
;
FrameworkLang_SCIKIT returns string: "scikit-learn" ;
FrameworkLang_R returns string: "R" ;
FrameworkLang_JavaWeka returns string: "Weka" ;
MLAlgorithm infers MLAlgorithm:
(SVM | DT | RandomForest | LogisticRegression )
;
SVM infers SVM:
{ infer SVM} 'SVM' ('gamma=' gamma=FLOAT )? ('C=' C=FLOAT )? ('kernel=' kernel=SVMKernel )? ('classification' svmclassification=SVMClassification )?
;
type SVMKernel = 'linear' | 'polynomial' | 'radial';
SVMKernel returns SVMKernel:
SVMKernel_linear | SVMKernel_poly | SVMKernel_radial
;
SVMKernel_linear returns string: 'linear' ;
SVMKernel_poly returns string: 'polynomial' ;
SVMKernel_radial returns string: 'radial' ;
type SVMClassification = "C-classification" | "nu-classification" | "one-classification";
SVMClassification returns SVMClassification:
SVMClassification_cClass | SVMClassification_nuClass | SVMClassification_oneClass
;
SVMClassification_cClass returns string: "C-classification" ;
SVMClassification_nuClass returns string: "nu-classification" ;
SVMClassification_oneClass returns string: "one-classification" ;
DT infers DT:
{ infer DT} ('DT' | 'DecisionTree' )(max_depth=INT )?
;
RandomForest infers RandomForest:
{ infer RandomForest} ('RandomForest' | 'RF' )
;
LogisticRegression infers LogisticRegression:
{ infer LogisticRegression} 'LogisticRegression'
;
FLOAT returns string:
INT '.' INT
;
RFormula infers RFormula:
('formula' (predictive=FormulaItem "~" )? predictors=XFormula )
;
XFormula infers XFormula:
(AllVariables | PredictorVariables )
;
AllVariables infers AllVariables:
all='.'
;
PredictorVariables infers PredictorVariables:
(vars+=FormulaItem ("+" vars+=FormulaItem )* )
;
FormulaItem infers FormulaItem:
column=INT | colName=STRING
;
Validation infers Validation:
stratification=StratificationMethod metric+=ValidationMetric +
;
StratificationMethod infers StratificationMethod:
CrossValidation | TrainingTest
;
CrossValidation infers CrossValidation:
'CrossValidation' '{' 'numRepetitionCross' ^number=INT '}'
;
TrainingTest infers TrainingTest:
'TrainingTest' '{' 'pourcentageTraining' ^number=INT '}'
;
type ValidationMetric = 'recall' | 'precision' | 'F1';
ValidationMetric returns ValidationMetric:
ValidationMetric_RECALL | ValidationMetric_PRECISION | ValidationMetric_F1
;
ValidationMetric_RECALL returns string: 'recall' ;
ValidationMetric_PRECISION returns string: 'precision' ;
ValidationMetric_F1 returns string: 'F1' ;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.