61,971 reputation
18171295
bio website
location California, USA
age
visits member for 2 years, 9 months
seen 7 hours ago

1d
comment Division by zero is slow
@Mr.Wizard Unfortunately, it looks a lot like your code too... what have you done to belisarius! :P
1d
comment Classify Function : Sentiment Polarity
@afentis Look up Naïve Bayes classifiers and hierarchical classification.
1d
comment Classify Function : Sentiment Polarity
@afentis If knowing which classifier is used and the details of the algorithm are important, then I highly suggest using python for this. Its NLTK and Machine Learning libraries are light years ahead of what Mathematica is currently offering. They've also been around for several years, as opposed to just 4 or so months for Mathematica, thus tried and tested and more importantly, bugs are actively fixed and new algorithms are routinely added.
Oct
26
comment Confusing memoization behavior — caching a function that returns a function
Is there some reason you're not memoizing tau instead? It seems awkward and not "clean" to memoize ex[p, q] and still have it depend on some global value of t. Making your code free of such dependencies will help fix such issues.
Oct
26
comment Confusing memoization behavior — caching a function that returns a function
The problem is because your t in the function is being replaced by the value of t that is being plotted and once this happens, the replacement t -> time no longer works (there is no "t" to replace). Either use something like $t in your function definitions or a formal symbol \[FormalT] or use a different variable when plotting (i.e. Plot[test[s, 2, 9], ...]).
Oct
26
comment Obtaining probability density function from a cumulative distribution function
Ok, I was going to reopen it but kguler has already done it. Good luck!
Oct
22
comment How to partition a list and leave in the last sublist which is of different length?
@xslittlegrass You can post-process the output with a rule. Something like list /. {h___List, p_List, l_List} :> {h, p ~Join~ l}
Oct
17
comment Tutorial video on the Wolfram Language
To everyone flagging it as "not an actual question" — then please cast a vote to close! Y'all have the privilege to do so.
Oct
6
comment Explanation for coloring of variables by code editor?
@KeeganMcCarthy Are you using a notebook specific context or is this all in Global? If the former, then this is not unusual.
Oct
2
comment ParametricNDSolve KKT Constraint Directly
OP had a response to you in a deleted answer (which is now an addendum to the question). Please respond under the question to notify them (if you choose to respond).
Oct
2
comment Calendar view outline
@alancalvitti Sorry, I've lost access to Mathematica and until I get around to buying a copy, I won't be able to answer. I believe you just need the definition of boundary for my answer and this part is in the question.
Oct
1
comment Calendar view outline
I believe you can use this answer of mine to get the outline as a closed Line (just feed the points to Line).
Oct
1
comment My Baum-Welch algorithm is very slow. Is it due to Mathematica?
(Just so you know, some of these comments are automatically generated from the /review queue). To commenters and flaggers: the "commentness" of the answer is noted and I think we all (including Igor) agree on that. However, Igor also has a valid point that the link does answer the question fully and reproducing the code there (which is a lot) is kinda futile. Please participate in the meta discussion if you have thoughts/more to say on this. I will not be deleting this answer.
Oct
1
comment My Baum-Welch algorithm is very slow. Is it due to Mathematica?
That is a lot of code for anyone on this site to have time to read/critique/analyze it fully and most likely, no one is going to. However from a quick glance at the code, I can most certainly say that the slowness is due to the procedural programming style. All those Sum[Sum[Sum[Sum... terms in nested Whiles are bound to give terrible performance. Writing the algorithm in a functional manner would certainly speed things up a lot. Unfortunately, it is hard (for me at least) to recommend specific changes to make to your code. If I were you, I'd start afresh with functional (use Igor's link)
Sep
20
comment Converting code from Matlab to Mathematica
I wrote an implementation of k-means in this answer.
Sep
17
comment Is garbage collection broken in version 10.0.0?
I don't have 10.0.1 or Mathematica with me now, but what you're describing doesn't seem unexpected. I think if you re-evaluate the top cell a second time, you should see {"foo$"} in the output.
Sep
16
comment How do I plot the images of oriented curves under complex transformation?
I used to have a "systematic way to obtain a nice parametrization of an arbitrary conic" — it was called "Ask J. M." :)
Sep
15
comment How do I bandpass a signal in Mathematica 8
@Mr.Wizard No, sorry. It's a lot of time commitment and detail that's well beyond the scope of this site. OP still hasn't replied to my question re: MATLAB. If that's the case, then the second example here would be the best way to proceed.
Sep
15
comment How do I bandpass a signal in Mathematica 8
A crude filtering could be done with Fourier, a window and InverseFourier. If you want to use specific FIR/IIR filters with certain guarantees of performance in the pass/stop bands, then you're going to have to write a lot of the code yourself. If you have access to MATLAB (and the DSP toolbox), then I suggest using the functions from it in Mathematica 8.
Sep
14
comment Generating random symmetric matrix
Ah, yes of course.