« first day (3289 days earlier)      last day (1178 days later) » 

5:19 AM
@AntiEarth I'm dumb but that makes sense
 
 
2 hours later…
7:37 AM
In[84]:= f1= Compile[{{num1,_Integer},{num2,_Integer}}, num1+num2];
f2= Plus[ num1,num2];
f1[2,3]
f2[2,3]
Out[86] = 5
Out[87]= (num1 + num2)[2, 3]
why does f2[2,3] not work?
Just want to try if assign a function to a variable work or not.
 
8:22 AM
@anhnha A function in Wolfram Language is defined f[x_, y_] := x + y or f = Function[{x, y}, x + y]. What you're doing is f = x + y where x and y are undefined symbols and f is just a variable... so naturally, when you write f[2,3] you then replace f with the value of that variable, which is x + y. So it becomes (x + y)[2, 3].
 
8:32 AM
@AntiEarth maybe, just maybe, you could do this by looking for the limited number of ways in which patterns can constrain the range of numbers. For example,> and < set lower and upper limits, respectively. Alternatives (as in your example) has a max and a min. After you've found the max and min you could just generate all the number in that range and use Cases to select the valid ones.
 
 
2 hours later…
10:11 AM
@C.E. yes, I knew that function definition but curious why the first one f1 works while f2 does not.
 
 
1 hour later…
11:11 AM
@anhnha Note the similarity between Compile[..., x + y] and Function[{x, y}, x + y]. Also note the difference between := (normally used for function definitions) and = (used with Compile and Function).
It's a very basic question and as it often is with basic questions, it's hard to know where to start. I guess one example would be if you take x = 5 and then write x[10] what would you expect to happen? Well, we know that Mathematica always evaualtes the heads, so clearly (at least to me) this should evaluate to 5[10]. And it's the same thing that's happening in your case.
 
11:31 AM
that makes sense
reading Compile function working that way made me wonder if that works for general functions
t = Plus[{x, y}, x + y];
t[1, 2]
but this doesn't work
 
12:21 PM
In[218]:= cf = Compile[{{a, _Integer}, {b, _Integer}, c}, a*b + c];
cf[2, 3, d]
CompiledFunction::cfsa: Argument d at position 3 should be a machine-size real number.
Out[219]= 6 + d
how can I solve this warning?
I want "c" to be anything.
 
 
1 hour later…
1:47 PM
@anhnha The first paragraph of the details in the documentation say what types are supported in `Compile`, symbols is not one of them.
https://reference.wolfram.com/language/ref/Compile.html
 
 
2 hours later…
3:38 PM
It's a real shame the Wolfram Cloud android app doesn't use the device location for Here. Lots of cool stuff you coulda built with that.
 
 
1 hour later…
4:40 PM
posted on January 19, 2021 by Koji Maruyama

心臓病学のような医療分野でも,Wolfram言語は新たな知見獲得や臨床現場における予測に役立っています.最近,金沢大学先進予防医学研究科の中嶋憲一教授がリードする,Wolfram言語の機械学習機能を用いた心不全による死亡リスク予測の研究に参加し,論文が出版されましたのでその概略を紹介します.そこでは,末期心不全(HFD)と重度の不整脈/突然死(ArE)によって引き起こされる心臓死の確率を区別できる分類器を構築することを目指しました. 現在の高齢化社会における深刻な健康問題である慢性心不全の治療においては,適切な治療法を選択するために,信頼性の高いリスク層別化モデルが切望されています. 薬理学的治療やさまざまな装置の大幅な進歩にもかかわらず、死亡率は依然として高いままです. 高リスク患者の治療管理も非常に困難で,植込み型除細動器や心臓再同期療法などにより費用も高額になりがちです.そこで

 
 
3 hours later…
8:16 PM
I don't get why EntityRegister doesn't mean that the EntityStore isn't stored between sessions. What's the point then - I'm not going to re-run all the code to create the entitystore every time I want to use it
 
0
Q: 2020: a year in moderation

JNat As we say goodbye to the old year and welcome the new one, we have a tradition of sharing moderation stats for the past 12 months. As most of you here are aware, sites on the Stack Exchange network are moderated somewhat differently to other sites on the web: We designed the Stack Exchange netw...

 
8:42 PM
@CarlLange Well, entity stores can be stored in other ways. It's just not the purpose of EntityRegister.
init.m seems like a reasonable place to register an entity store that one always wants to be available.
 
8:56 PM
@C.E. Yeah, I guess. I guess I just got a bit surprised that I didn't see an example in the docs of how to store them after an hour or two of messing with the syntax to get an EntityStore actually working nicely. I think I might use ResourceRegister or similar to store it, but I haven't tried it out.
 
 
1 hour later…
10:05 PM
With version 12.2 Mathematica has made a huge progress in the importation of pdf files. I have imported 2200 files as PlainText, Images, PageImage : No problem. Before 12.2 It didn't work in almost 40% of cases.
Problem : The good questions mentioning pdf import use linked example files. These are old question and the links are broken. It's Impossible to try again to update the answer.
I'll be back tomorow.
 

« first day (3289 days earlier)      last day (1178 days later) »