I've been using Dialyzer (and Dialyxir) on a big Elixir code base, and when I run it, it spits out a bunch of diagnostic information. It references .plt files a lot. What does "PLT" stand for in the context of Erlang and Dialyzer?
In Dialyzer's context, PLT stands for Persistent Lookup Table (link to docs). It is the data structure that contains inferred and user-annotated (i.e. 'spec-ed') type signatures that Dialyzer is expected to treat as known and correct when analyzing new files.
I'm trying to find the c++ file for Z3 where the algorithm backtraces if it can't find a solution on the current branch. I've been looking through all the files and tried debug mode on the python files, but no luck so far. I just want to add a print statement to the method, so I can tell when it is returning to a previous node and trying a new path.
Thanks!
It depends on which solver Z3 uses for your problem. It typically uses smt_context.cpp in src/smt. The relevant backjump can be traced in the context::pop_scope method. Other solvers exist too: the src/sat/sat_solver is used for bit-vector and Boolean problems. It has a similar pop method. Finally, nlsat is used for non-linear polynomial arithmetic over the reals.
Hi I'm looking for guidance on the best way forwards, I want to take valid F# code and run a transformation at the AST level to generate a new AST which is then compiled and loaded. As an example I might want to run a CPS transform on the AST. Interestingly the input to the transform would be valid type checked F# code, embedding valid f# code in quotations in this example would seem pretty ugly. Adding an attribute to every let definition would also be onerous. Ideally I'd take an existing module, get the AST of all the definitions inside and run my transform to generate a new module with the transformation added.
I am trying to generate a PMML from a random forest model I obtained using R. I am using the randomForest package 4.6-12 and the last version of PMML for R. But every time I try to generate the PMML obtain an error. Here is the code:
data_train.rf <- randomForest( TARGET ~ ., data = train, ntree=100, na.action=na.omit, importance=TRUE)
pmml_file = pmml(data_train.rf)
[1] "Now converting tree 1 to PMML"
Error in append.XMLNode(rfNode, splitNode) : object 'splitNode' not found
I haven't been able to find the origin of the problem, any thoughts?
Thanks in advance,
Alvaro
Looks like the variable splitNode has not been initialized inside the "pmml" package. The initialization pathway depends on the data type of the split variable (eg. numeric, logical, factor). Please see the source code of the /R/pmml.randomForest.R file inside "pmml" package.
So, what are the columns in your train data.frame object?
Alternatively, you could try out the r2pmml package as it is much better at handling the randomForest model type.
The pmml code assumes the data type of the variables are numeric, simple logical or factor. It wont work if the data you use are some other type; DateTime for example.
It would help if your problem is reproducible; ideally you would provide the dataset you used. If not, at least a sample of it or a description of it...maybe summarize it.
You should also consider emailing the package maintainers directly.
I may have found the origin for this problem. In my dataset I have approx 500000 events and 30 variables, 10 of these variables are factors, and some of them have weakly populated levels in some cases having as little as 1 event.
I built several Random Forest models, each time including and extra variable to the model. I started adding to the model the numerical variables without a problem to generate a PMML, the same happened for the categorical variables with all levels largely populated, when I tried to include categorical variables with levels weakly populated I got the error:
Error in append.XMLNode(rfNode, splitNode) : object 'splitNode' not found
I suppose that the origin of the problem is that in some situations when building a tree where the levels is weakly populated then there is no split as there is only one case and although the randomForest package knows how to handle these cases, the pmml package does not.
My tests show that this problem appears when the number of levels of a categorical variable goes beyond the maximum number allowed by the randomForest function. The split defined in the forest sublist is no longer a positive integer which is required by the split definition for categorical objects. Reducing the number of levels fixed the problem.
Just found an inconsistency issue that the parsing results of the Parser in CoreNLP and the standalone Stanford Parser are different.
For example, given a sentence "Microsoft released Windows 10.".
The Parser in CoreNLP (http://nlp.stanford.edu:8080/corenlp/process) will give the following result:
However, the standalone Stanford Parser (http://nlp.stanford.edu:8080/parser/index.jsp) will give the following result:
I also tried to run the codes on my machines. Both the parsers used the same model trained on the same date (englishPCFG.ser.gz, 2015-01-29). But the results given by the two parsers are still different. I tried several other sentences, and it looks that the standalone parser gives better results.
Anyone has idea on this?
The parser output can be different depending on whether you run it on a part-of-speech tagged sentence or not.
See the Parser FAQ for more information.