« first day (2625 days earlier)      last day (1849 days later) » 

2:12 AM
Anyone have a good way to fit a function under the constraint that it pass through a given point?
Oh god it looks like it's literally just an option to NonlinearModelFit-__-
Well I'll read better next time
 
 
5 hours later…
7:28 AM
Is this something already known? Integrate can hang because one did not tell it not to generate conditions?  For example

   Integrate[Log[x - a], {x, c, d}]

Hangs. But

    Integrate[Log[x - a], {x, c, d}, GenerateConditions -> False]

returns right away. I was going to ask about this on main board, but thought may be this is something known to happen sometimes. I find it a little strange that default setting which is to generate conditions can make integrate hangs. If a user does not know about this option, then they will not know how to avoid it.
 
7:43 AM
OK. It did not hang. But it took looong time. may be 10 minutes on my PC.
 
8:31 AM
Contemplating on what process generates this kind of empirical probability distribution (InverseCDF in this case):
Data is walking times in minutes from home door to metro platform. Main source of variation are three elevators along the way...
 
9:02 AM
@kirma Does it make sense that the waiting time for each elevator w_i would be a uniform distribution (assuming it shuttles back and forth at constant speed) so that the total wait would be TransformedDistribution[w1 + w2 + w3]?
@Szabolcs If you ever have a chance to implement that, please let me know. The built-in docs at least have the thumbnail image for details to hint that there's something useful there
 
@ChrisK I think the distribution should be plain uniform distribution in that case. More data I get more it looks like the distribution consists of two differently weighted uniform distributions...
 
9:21 AM
BTW, FindDistributionParameters is pretty worthless in finding good fits for a MixtureDistribution or UniformDistributions...
s/or/of/
 
9:43 AM
@kirma IDK, I think the waiting time at each elevator would be uniform and then you need to add them (well, if they're not synchronized) to get the total wait
 
 
2 hours later…
11:43 AM
Minimal figure-eight knot on the body-centered cubic lattice
Some neat stuff from math folks...
https://community.wolfram.com/groups/-/m/t/1640932
 
 
9 hours later…
8:47 PM
@Szabolcs That's a good point...
@Szabolcs & @anyone interested in creating documentation pages: I played around a bit and I found a way to create documentation pages that look perfect both in V10 and V11 - see here for a demonstration
@Kuba Append seems to be slightly faster than wrapping the association in a new one:
MapAt[Append[#, "new" -> (#a + #b)] &, asso, {"hts", All}]
I have a function AddKey in the ForScience` paclet that does essentially that:
AddKey[r__Rule]:=AddKey@@((List@@@{r})\[Transpose])
AddKey[key_,f_]:=#~Append~(key->f@#)&
AddKey[keys_List,fs_List]:=RightComposition@@MapThread[AddKey,{keys,fs}]
It's used as MapAt[AddKey["new", #a + #b &], asso, {"hts", All}], which (for me at least) makes the intent a bit clearer than an explicit Append or similar
 
9:08 PM
@LukasLang Can you upload a minimal sample notebook (doc page)?
 
Is there RobustScaler in mathematica(scikit-learn.org/stable/modules/generated/…) ? I am trying to use Standardize
Standardize[X, Median, InterquartileRange].. But I am not getting the same result as the one : scikit-learn.org/stable/modules/generated/…
 
@LukasLang Does it rely on Dynamic kernel-evaluations, or it is content with the FE only?
@LukasLang How do you generally create these doc pages? Do you make use of the Workbench at all?
@LukasLang So the principle is that one writes the doc pages in a DSL like this and the pages get automatically generated from them?
 
9:29 PM
@Szabolcs Sorry, completely forgot to write something about how it works - it does use Dynamic evaluation (I figured that since the doc pages from V11 are using Dynamic anyway I might as well use it).
The idea is to put everything that needs to change into `TemplateBox` es, so it can be manipulated using a stylesheet. The notebook contains a `NotebookDynamicExpression`, which checks the `$VersionNumber` once upon opening the notebook. If it <11, the Stylesheet is adapted. To work properly, the notebook needs to be in a trusted directory, otherwise some `TemplateBox` es are not updated prope
You can find the notebook from the clip (and a cut down version) here: dropbox.com/sh/64r44v8mpcbaxh3/AADlLrvanIDWsIxRB52PJ6m3a?dl=0
 
It is possible to check the version without running the kernel.
 
@psimeson There is a difference (and it is pointed out in the documentation) between standardizing and scaling to a range. The common example of standardizing is centering and scaling a Gaussian distributed list so that its mean is zero and its standard deviation is 1. With you modification, Standardize will simply compute (list - Median[list])/InterquartileRange[list-Median[list]
 
The minimal version seems to have an issue with one of the dropdown arrows, not sure what that's about...
 
Try this instead, which is scaling to a range:
l = list - Median[list];
Rescale[l, InterquartileRange[l]]
 
@Szabolcs But can I replace the stylesheet without the kernel?
 
9:31 PM
Kuba's the expert on this, but let me look up how I did it for MaTeX ...
 
Or do you think it's possible to do everything inside the DisplayFunction of the TemplateBoxes?
 
BaseStyle -> FEPrivate`If[
                        FEPrivate`Less[ FEPrivate`$VersionNumber, 11.1],
                        {"InlineFormula", FontFamily -> "Verdana"},
                        {"InlineFormula"}
                      ]
 
Hmm, interesting... I'll definitely play around with that when I find the time
 
11
Q: Creating version specific notebook styles: decide based on whether version is at least 11.1

SzabolcsI am trying to clean up the appearance of user-generated documentation in 11.1. I believe in some cases I need to set options based on the front end version: use one value for 10.0-11.0 and a different value for 11.1 or later. What is the best way to do this? From this post, I learned that we ...

Because 11.1 was the version where the style changed.
 
@psimeson Wait, `InterquartileRange` gives the size of the range and not the range itself. Try this instead:
l = list - Median[list];
Rescale[l, {Quantile[l, 0.25], Quantile[l, 0.75]}]
 
9:35 PM
@Szabolcs Yes, that's the idea. Initially, I thought about using the Workbench, but it seemed to painful to use - also, this way, I get nice git diffs. Another advantage is that stuff like this cross-version compatibility should be rather straightforward to implement
 
@LukasLang So you only have input cells specified, and the output is generated while the docs are being built?
 
@C.E. It still doesn't give the result that RobustScaler gives
 
@Szabolcs Thanks for the link, I'm already looking forward to play around with that :)
 
@psimeson Can you give an example? Let's say a list of 50 values randomly drawn from some distribution.
 
imgur.com/a/YwJSSvk ..this is the one from sklearn page
 
9:40 PM
@Szabolcs Yes, the example cells are put into a separate notebook, which is evaluated during build. This means that you will always get the most up-to-date output. There are a few potential issues with Contexts etc., but by now I feel like I have a pretty good understanding of how to avoid them.
The downside of building everything on-the-fly is that it's quite slow, since notebook manipulation within the front-end is super laggy. For that reason, I've implemented a cache, so notebooks are only rebuilt if the underlying data change. I also plan to look into more granular caching of e.g. individual examples, but I first need to find a good way to determine if a given example should be re-run
 
@LukasLang What if I want to include pictures in the documentation?
 
@LukasLang I think with Cell[StyleData[StyleDefinitions->FEPrivate`If[..., sheet1, sheet2]]]
 
@C.E. sorry forgot to tag you... imgur.com/a/YwJSSvk ..this is the one from the sklearn page
 
Whenever possible the "FEPrivate`" functions are better than Dynamic
 
@LukasLang @b3m2a1 Related to docs, in case you're not aware of it, if you build a search index using 11.3, then install that paclet for 11.2, doc search will be completely broken in 11.2. So either don't generate new-style search indices or make sure you do it with 11.2 only.
Meaning that it won't be possible to search for anything at all, not even built-in things.
 
9:51 PM
@Szabolcs ah yeah I think a MaTeX version I had installed (or maybe some build or something) wrecked my search for a moment
But I uninstalled it and all is well
 
@b3m2a1 No MaTeX version is affected, it was IGraph/M
the latest one
 
Ah right. That's what it was.
 
I'll have to do an update but couldn't get around to it
 
Oh hence the linked issue. I clearly did not listen to myself here: chat.stackexchange.com/transcript/message/49662768#49662768
 
@b3m2a1 Do let me know next time if you realize that such a serious issue is caused by my stuff ...
 
9:53 PM
@Szabolcs I figured it was all the futzing about I've done with my docs and layout and stuff
 
@Szabolcs Most places of the documentation page data structures accept arbitrary boxes, so it should be rather easy to include an image that way (i.e. load from file -> ToBoxes -> add wherever it's needed). But a more straightforward way is on my todo list..
 
@LukasLang a nice way is to use FEPrivate`ImportImage when possible
It can load an image in a Dynamic fashion without having to cook in the entire image data
 
@b3m2a1 Thanks, that's good to know - I really need to look into FEPrivate`* more... I wanted to do so a few times, but never quite managed until now
 
@LukasLang maybe I can find a time to write up what I know...
Also useful is FE`Evaluate which basically tells you the result from a FEPrivate`... call
 
@psimeson it seems you were right; RobustScaler standardizes rather than scales to a range... The problem with Standardize is that it divides on f2 applied to the original list, not applied to the list that's been shifted by f1. Also, InterquartileRange is not giving me the values that I expect, which are the values EuclideanDistance @@ Quantile[l, {0.25, 0.75}].
This will give you the same values as RobustScaler but I don't know why the factor 2 is needed:

robustScale[list_] := Module[{l},
l = list - Median[list];
2 l/EuclideanDistance @@ Quantile[l, {0.25, 0.75}]
]

data = {{1., -2., 2.}, {-2., 1., 3.}, {4., 1., -2.}};
robustScale /@ Transpose[data] // Transpose // MatrixForm
I have to go now.
 
10:05 PM
@b3m2a1 @Szabolcs Regarding the documentation index: If you try really hard, there is a way to build documentation indices that work with at least 10.4 to 11.3, all from within 11.3. I've implemented a function to do that here
 
@psimeson Sorry again, I'm a bit hasty in my answers because I really have to go. Maybe it isn't a problem with Standardize after all, because you can also write

2 Standardize[
#,
Median,
EuclideanDistance @@ Quantile[#, {0.25, 0.75}] &
] & /@ Transpose[data]

but I don't have time to further investigate how this all works. Maybe you can figure it out.
 
10:54 PM
@LukasLang that's basically just building the old-style indices, right? Or is it also doing the new ones?
 

« first day (2625 days earlier)      last day (1849 days later) »