What does "log" in feature_matrix[["MEAN_SUNDAY(log.value, datetime)", "MEAN_SUNDAY(log.value_2, datetime)"]] from featuretools mean? - featuretools

I have a doubt if log.value and log.value_2 is,
1) The logarithm of column "value" and "value_2" along with "datetime" is sent as two inputs to MEAN_SUNDAY to perform the user-defined function.
2) The log is just an entity from the entityset which accesses its columns "value" and "value_2".
Can you please tell me which is correct and how do I differentiate that my feature extracted is actually (1) or (2)?

The second interpretation is correct. The name of the entity is log.

Related

Produce a path to a field in protobuf in Python

I am working on a function that analyzes data (based on some domain-specific logic) in protobufs. When the function finds an issue, I want to include the path to the offending field, including the indexes for the repeated fields.
For example, given the protobuf below:
proto = ECS(
service=[
Service(),
Service(
capacity_provider_strategy=[
ServiceCapacityProviderStrategyItem(base=1),
ServiceCapacityProviderStrategyItem(base=2),
]
)
]
)
Let's assume that the offending field is field = proto.service[1].capacity_provider_strategy[0].
How would I, given only the field produce ecs.service[1].capacity_provider_strategy[0] in a general way?
Please, note that I am looking for a way to produce the path mentioned above solely based on the supplied field since the logic of producing the error message is de-coupled from the analyzing logic. I realize, that (in the analyzing logic) I could keep track of the indexes of the repeated fields, but this would put more overhead on the analyzing function.

How to use standerror() in depmixS4

Summary(fittedmodel) gives me the coefficients of covariance for transition matrics. I am also curious how to get stand error values. it looks like standerror(fittedmodel) can work for that. But I have problem to understand the results. For example, the summary() result of my model and the result of call standardError(fm2a), but I do not understand the results of standardError() function.
code:
mod1 <- depmix(list(rt~1,corr~1),data=speed,transition=~Pacc,nstates=2,
family=list(gaussian(),multinomial("identity")),ntimes=c(168,134,137))
set.seed(3)
fmod1 <- fit(mod1)
standardError(fmod1)
The depmixS4::standardError function returns a data.frame with in the rows the parameters in the same order as when calling e.g. getpars(fmod1). In the first column (par) you will find the parameter estimate, the second column constr you will find a code reflecting whether the estimate is on the bound of the parameter space (bnd), a fixed parameter (fix), or whether the parameter is included in the estimated standard error (inc). The third column (se) provides the estimated standard error for the included parameters. Standard errors for bnd or fix parameters can not be estimated, and hence the value is NA.

How to get fields of a Julia object

Given a Julia object of composite type, how can one determine its fields?
I know one solution if you're working in the REPL: First you figure out the type of the object via a call to typeof, then enter help mode (?), and then look up the type. Is there a more programmatic way to achieve the same thing?
For v0.7+
Use fieldnames(x), where x is a DataType. For example, use fieldnames(Date), instead of fieldnames(today()), or else use fieldnames(typeof(today())).
This returns Vector{Symbol} listing the field names in order.
If a field name is myfield, then to retrieve the values in that field use either getfield(x, :myfield), or the shortcut syntax x.myfield.
Another useful and related function to play around with is dump(x).
Before v0.7
Use fieldnames(x), where x is either an instance of the composite type you are interested in, or else a DataType. That is, fieldnames(today()) and fieldnames(Date) are equally valid and have the same output.
suppose the object is obj,
you can get all the information of its fields with following code snippet:
T = typeof(obj)
for (name, typ) in zip(fieldnames(T), T.types)
println("type of the fieldname $name is $typ")
end
Here, fieldnames(T) returns the vector of field names and T.types returns the corresponding vector of type of the fields.

How to represent a missing xsd:dateTime in RDF?

I have a dataset with data collected from a form that contains various date and value fields. Not all fields are mandatory so blanks are possible and
in many cases expected, like a DeathDate field for a patient who is still alive.
How do I best represent these blanks in the data?
I represent DeathDate using xsd:dateTime. Blanks or empty spaces are not allowed. All of these are flagged as invalid when validating using Jena RIOT:
foo:DeathDate_1
a foo:Deathdate ;
time:inXSDDatetime " "^^xsd:dateTime .
foo:DeathDate_2
a foo:Deathdate ;
time:inXSDDatetime ""^^xsd:dateTime .
foo:DeathDate_3
a foo:Deathdate ;
time:inXSDDatetime "--"^^xsd:dateTime .
I prefer to not omit the triple because I need to know if it was blank on the source versus a conversion error during construction of my RDF.
What is the best way to code these missing values?
You should represent this by just omitting the triple. That's the meaning of a triple that's "not present": it's information that is (currently) unknown.
Alternatively, you can choose to give it the value "unknown"^^xsd:string when there's no death date. The solution in this case is to not datatype it as an xsd:dateTime, but just as a simple string. It doesn't have to be a string of course, you could use any kind of "special" value for this, e.g. a boolean false - just as long as it's a valid literal value that you can distinguish from actual death dates. This will solve the parsing problem, but IMHO if you do this, you are setting yourself up for headaches in processing the data further down the line (because you will need to ask queries over this data, and they will have to take two different types of values into account, plus the possibility that the field is missing).
I prefer to not omit the triple because I need to know if it was blank
on the source versus a conversion error during construction of my RDF.
This sounds like an XY problem. If there are conversion errors, your application should signal that in another way, e.g. by logging an error. You shouldn't try to solve this by "corrupting" your data.

Cannot configure Resharper to allow abbreviations as a parameter name

I am trying to get resharper to accept "ID" as an allowable abbreviation when used in an parameter list, yet it seems to ignore the abbreviation and complain about inconsistent naming with the message...
"Name 'ID' does not match rule 'Parameters'. Suggested name is 'id'."
... for a method signature like
GetThisSpecificEntity(int? ID, string uniqueEntityName);
... but does not generate a message for signatures like this...
GetThisSpecificEntity(int? entityID, string uniqueEntityName);
Trying to change the abbreviations list to include "ID" does not stop this from popping up, and changing parameter naming options to allow "ID" as prefix or suffix seems to causes other conflicts and weirdness with the default 'Parameters' rule elsewhere in code.
I'm not looking to debate usage of "ID" (Identity) vs "Id" (Ego) as part of this, as it seems to be a problem for any parameter that is added into the abbreviations list. I have about a dozen domain-specific abbreviations - "AII", "SAP", "PLC", etc - that I've added to reduce the noise generated by legacy code, and I simply want to have this abbreviation honored in parameter lists. Is there a way to make this work the way I need it to?

Resources