« first day (1687 days earlier)      last day (1558 days later) » 

10:06 AM
good morning
 
morning
 
'ning
 
10:17 AM
If you translate the code to English you will have way more chances of people helping you — Ander Biguri 29 secs ago
@AnderBiguri sprechen Sie keine Deutsch? ;)
But just close the entire thing. OP basically wants us to extend their code from 2D to 3D. They need to narrow the problem to just "How to plot in 3D?"
 
Wie jetzt? Da wagt es jemand kein deutsch zu sprechen?
 
@Adriaan that scares me
 
@AnderBiguri que?
 
10:32 AM
That is much better :D
 
Everyone should just speak Basque. Life would be so much easier in that case.
 
Horrekin bai nago ados!
 
... on the other hand, perhaps not
 
D:
Ah, the standard conjugations of the verb "to be": upload.wikimedia.org/wikipedia/commons/9/90/…
 
Yup, you showed that earlier around here
 
10:37 AM
I dont even use a lot of them, too hard
 
10:50 AM
@AnderBiguri What is the difference between the columns?
 
@Dev-iL madness increases to the right.
 
@AnderBiguri I'm happy with german
@Adriaan is this a political statement?
 
@flawr I have a similar page for "sein" in my German lecture notes though; present, past, past perfect, futur I, futur II, conjugative and active/passive
@flawr "I couldn't possibly comment"
 
11:07 AM
@Adriaan I don't doubt it, I'm just happy because I didn't have to learn it from scratch.
 
@flawr well, if Mundart is your native language, that's as good as having to learn German from scratch :P
 
But you always will hear some form of German, you can't escape it:)
 
@flawr Escaping German is easy, just cross the Röstigraben
 
I fear that this is worse than hearing german.
Or at least considered worse by many people:)
 
11:36 AM
uh, I am bad at explaining in general, more with languages. But in language terms, it means:

Nor-direct object
Nori-indirect object
nork-subject
So when you put the verb, it will have a different form depending on the whole sentence.
So,

I have done this,
I have done this to you,
I have taken this,
I have taken this to you
I have taken these
I have taken these to someone else
....


All would have a different word for "have done"/"have taken"
something like that
plus all the tenses (rows)
@flawr no one is happy with german T.T
 
@AnderBiguri That's sufficiently clear, thanks :)
 
12:43 PM
@AnderBiguri D: am I no one
 
@flawr That depends... are you Arya Stark?
 
1:23 PM
Guys I have an algorithmic question... Suppose I have some curve (given as X and Y vectors), and I would like to automatically find the largest section of X for which Y can be considered linear (exact criteria TBD). How would I approach this?
 
derivative?
Savitzky--Golay filter?
 
Derivative isn't smooth locally
 
if you know it starts linear you can do incremental linear fits as long as it's "good enough"
 
@AndrasDeak Moving average isn't really helpful either
^20 point moving average
 
@Dev-iL not sure how Savitzky--Golay relates to moving average, because I've never used it. But "continuous local approximant to noisy function" sounds exactly something that you can use to differentiate
@Dev-iL perhaps you can define a function bestlinear(from, to) which fits a linear function on the data in [from, to], and then optimize this function with respect to from, to
computationally a bit expensive, but no free lunch and things like that
 
1:27 PM
@AndrasDeak Yeah that's one way
 
(I'd expect this to be a solved problem though, so there has to be a better way :D)
 
@AndrasDeak it's not that bad, because fitting a 1-degree polynomial is really simple using matrix math
 
if I had your data I'd try playing with savgol_filter with some low-order polynomial and first derivative
 
So it smooths the data a bit, but that doesn't really help me with the bigger problem :X
What if I took a different approach - fit this with a fourier series, then analyze the fit somehow?
 
But doesn't it give you a reasonable first derivative? My point being that the derivative will have a plateau.
@Dev-iL I don't think Fourier plays well with "most linear"
 
1:35 PM
Why, don't you know that sin(x) == x? ;)
2
 
sorry, I can only think of curve fitting approaches
Hmm, can you do something with y./x?
that would also have plateaux where the function is linear, would it not?
 
hmm
yeah, because if it were linear, even then y = ax + b --> y/x = a + b/x which would be noisy
@Dev-iL Fourier could help you like a moving average, if you filter out the high-frequency components that comprise the noise
but the result would still be wobbly...
you'd probably get a large sine component and some very small fluffs, and you'd have to find where that sine is "most linear"
 
Even if I had a Fourier series, determining the "largest linear region" would still require something like what you suggested earlier
 
yeah
 
1:44 PM
^ plot(X, (Y-Y(1))./(X-X(1)) );
 
2:12 PM
@AndrasDeak don't you work with magnets?
41
Q: How is a magnet held together? How come they don't explode?

Maximal IdealEdit: As some of the comments pointed out, the pictures below are misleading. The colors are just representations of the poles of the magnet, and when the colors change, they don't represent any change in the pieces of the magnet itself. See the comments in this post and Allure's answer. Imag...

 
2:53 PM
Instead of posting a comment saying that it worked, accept the answer that helped you. — Cris Luengo 12 mins ago
@CrisLuengo juts FYI, his answer was 6 seconds before I posted my initial version. So he did figure it out himself, just failed to properly explain what he did in an answer.
 
Sam
3:15 PM
hey all :D
 
\o hi Sam
 
Sam
Hey Adriaan hows it going :D
 
Scared shitless. I'm having my first ever ski-lesson on Friday, and I am still not convinced I ever should have accepted the offer :P
 
Sam
How hard can staying on your feet be? ;)
 
I'm more worried about doing that when at a 20 degree angle to the horizontal and moving at 100km/h
 
Sam
3:19 PM
lol!
My initial concern would be the 100km/h
 
FYI: A network wide strike is being considered. Working date is 24 Feb - 02 March.
4
 
Sam
I was not aware of this
 
me neither until about an hour ago
 
Sam
3:58 PM
I shall spread the word
 
4:40 PM
@Dev-iL I'm a bit late to the party: When you do a TV-regularized L2-recostruction, you will get a (more or less) piecewise constant function, this is because in the TV norm you have the L1-norm of the gradient. You can try to find a piecewise linear reconstruction by replacing the first derivative by the second derivative in the TV norm.
If you discretize this basically everything stays the same, you just replace Lx with lx and the derivatives by finite differences.
 
@Adriaan yup
 
@Adriaan hey, good luck!!!
It's not rocket science:)
 
5:11 PM
@Adriaan where did you find this?
 
@Adriaan What kind of impact do you think this'll have anyways? I'm genuinely curious how messy the site will get in that week, and if a week is long enough.. and when that week isn't done doesn't it just mean that people will have massive queues to work through if they want to continue user moderation?
I wonder if it would make more sense just to have an indefinite strike until things change
 
5:45 PM
@ballBreaker the idea is to send a signal without harming the community. The suggestion is to move items of organized moderation in such a way that can be worked on once the strike is over. Just to see how bad things go with spam and garbage if the people curating the site take a week off
it might happen that there's no visible impact, but then we're exactly where we started
 
Makes sense
I guess at the least, sending a message to the SO management not to ignore power users is never a bad move
 
6:05 PM
we all have doubts whether 1. it will have visible impact and (maybe not) and 2. if management will see visible impact (probably not)
 
6:33 PM
yeah for sure
I'm hoping it at least sends some sort of message to them
 
6:57 PM
@flawr Thanks for the tip! I'll try to figure out how to do that tomorrow, and see what I get...
 
@flawr SOCVR, obviously ;)
@ballBreaker I seriously doubt it, as I outlined in here a month or so ago. A few mods removing spam/rude stuff is enough to keep the wheels churning for the coming months, at least up to the point where our new overlord can sell the joint for his desired 700M. After that, the entire thing can go to shit
 
Yeah makes sense hahah
 
7:59 PM
@Dev-iL ah what I didn't consider: It seems you already know where the line segment you're looking for starts, right?
 
8:16 PM
lol I just tried it in Matlab, but without autograd it is a PITA :D
 
8:49 PM
ok now in python with autograd, but my idea doesn't seem to work
as usual
another idea: for each n fit a line through the first n points and look at the stats of the residual, as soon as the mean significantly deviates from 0 it isn't line-ish anymore
hmm, no that also doesn't seem to work
but it is a fun problem though:)
#bedtimemathproblems
@Dev-iL Do you know where the line starts (e.g. that it must go through 0)?
ah when the std deviates a lot from the initial level then we get something nonlinear:
It's a one-liner
clear;clc;clf;rng(0);x=linspace(0,2,1000);N=numel(x);y=sin(x)+0.02*randn(size(x));means=NaN(1,N);stds=NaN(1,N);for k=1:N;A=[x(1:k)',ones(k,1)];b=y(1:k)';params=A\b;residual=A*params-b;means(k)=mean(residual);stds(k)=std(residual);if mod(k,10)==0;yyaxis left;plot(x,y,'b',x(1:k),A*params,'.g');yyaxis right;plot(x,stds,'r');waitforbuttonpress;end;end
 

« first day (1687 days earlier)      last day (1558 days later) »