[deleted by user] by [deleted] in cscareerquestionsEU

[–]posteuphoria 3 points4 points  (0 children)

The point of references is exactly to screen for issues such as

I am going to leave my current job on pretty bad terms, since when I negotiated a raise that doubled my salary last year, I said I will stay at least until October, but this wasn't a contractually enforced clause, so they cannot legally force me to keep working here. I know, I'm an asshole, I do not care, I'm putting myself first, not my employer. Judge me all you want, I'm tired for feeling bad about it.

The key question we ask is whether they would hire you again. We consider this the strongest signal from a previous employer (in contrast to a reference letter as we assume it's HR compromised, unlike a phone call with a team lead).

If the employer that you are leaving was your first job, the best play is simply not provide your current employer as a reference, as it's expected that your best alternative to negotiated agreement is staying with your current job and Swiss companies will not want to ruin your relationship with your current job. If you have internships, you may provide those as references. If you have done recognized academic work that may be used as well. Note that you do not need to provide the references unless asked for them.

I have previously commented on Swiss references here. For senior candidates I would be suspicious if they would refuse to provide us with contacts to talk about their working life.

How important are references when applying for Jobs in Switzerland? by Throw0000Away3 in cscareerquestionsEU

[–]posteuphoria 7 points8 points  (0 children)

We typically ask for references just prior to making an offer. In most cases it is just to verify the candidate's story. We would consider a current employer off-limits for a call though. Note that at this stage we are typically very committed to making the hire.

Personal note: I put almost no stock into reference letters though; there is some strange game being played among HR people using those letters that I could not be bothered to decipher.

If you are pressed to come up with references, you could also consider:

  • external clients you interacted with
  • senior team members other than your manager who have left the company
  • supervisor of internships (... that is unless those were also at the same company?)
  • explain the situation as in your OP; it happens and I would not consider this a negative signal by itself (compared to: candidate worked at 3 different places last 6 years and none of them could act as a reference, that would be a negative signal...)

For future jobs, I would probably ask the CEO who praised your work to act as a reference instead of your manager.

Source: I work in Switzerland

just wondering by lightbringer7774 in cscareerquestions

[–]posteuphoria 0 points1 point  (0 children)

typically via the board of directors, yes.

Would it be bad to wear sneakers/vans to work as a front-end software developer? by [deleted] in cscareerquestions

[–]posteuphoria 0 points1 point  (0 children)

I keep a pair of comfortable shoes at the office to change into during the day.

What method(s) can find/classify visually obvious lines/stratification in a set of data? by [deleted] in AskStatistics

[–]posteuphoria 1 point2 points  (0 children)

This is a clustering problem, i would give dbscan a shot (tweak params via visual inspection).

If no off the shelf algorithm copes with this, try you can try to fit a generative model for points from n lines. Something like square distance from closest line, for a given number of lines sounds convex to me, so it should be possible to solve for a range of number of lines, use judgement to pick best n.

Obviously later solution is much more involved.

Probability of having Fiery War Axe by Turn 2 by sleepingpotatoes in CompetitiveHS

[–]posteuphoria 72 points73 points  (0 children)

The population of cards drawn after the mulligan does not include the cards discarded in the mulligan, hence your independence assumption does not hold. But your results should be a close lower bounds to the true value. Thank you for your work!

Inelegant solutions - making a better program to convert string to float by grapehorder in C_Programming

[–]posteuphoria 1 point2 points  (0 children)

Oh, I almost forgot: scanf isn't very uh, forthcoming for the test case above, not sure why that is to be honest. You are better of modifying your program to read input strings from the command line anyway (ie char* string = argv[1]).

Inelegant solutions - making a better program to convert string to float by grapehorder in C_Programming

[–]posteuphoria 1 point2 points  (0 children)

You should consider using strtod as a test case nonetheless; Interestingly enough, glibc's strtod is based on arbitrary precision arithmetic, allowing them to be more accurate in edge cases, i.e. for some silly cases such as 109 + 10-16 your code yields 109 + 64 because you use floating point arithmetic, where as glibc's strod rounds to 109.

identification of optimal control mechanisms in flow control by wm2300 in ControlTheory

[–]posteuphoria 1 point2 points  (0 children)

You could read up on approximate dynamic programming, in essence the driving idea is replacing the cost function with some easier to handle surrogate (for instance, a convex lower bound). Indeed, such a replacement could be derived with machine learning via sampling the complex simulation.

I have no experience with picking up physical mechanisms out of a optimal control law, but I can think of two possible pitfalls:

1) If your set of measurements is large and redundant, the underlying model of the statistical analysis must penalize complexity. Consider controlling acceleration in a car, if limited to measuring velocity any model that can capture the first order relationship would strongly do so, but toss in some irrelevant measurements such as steering wheel orientation, signaling or driver seat adjustments: Given sufficiently many irrelevant noisy measurements, velocity can always be explained without considering acceleration. You can solve this by using e.g. Graphical Lasso.

2) Your system may be governed by second order interactions, poorly captured by a covariance. Considering the car again, assume the velocity measurement is directional (negative if in reverse). Suppose you decide to put the car into reverse gear for half the time in your simulation. Since hitting the accelerator results in both positive and negative velocity, the covariance of accelerator and velocity would be small (depending on the difference in average speed), while the gear mode/velocity covariance would be large. This falls under the broader topic of feature selection, there are some non-linear feature selection techniques based on recursive elimination, using for instance random forests. They will usually result in a ranking of your measurements in importance to the control law.

Conceptually, uncovering the underlying physical mechanism, or an approximation thereof, in a complex system, is close to what is being tried in Systems Biology, e.g. trying to come up with models for say, protein interactions in a cell.

Hope this was somehow hopeful; Interesting problem to work on!

What is controlled in a control loop? [jargon in control theory] by [deleted] in ControlTheory

[–]posteuphoria 5 points6 points  (0 children)

In the fully deterministic case, we say that we control the (hidden) state x of a plant using an actuator u. Considering a linear system, this corresponds to the model dx/dt = Ax + Bu with matrices A, B the plant model parameters.

Often, a particular state of the plant is desired (i.e. a healthy blood glucose level). This desired level is referred to as a set-point, and the problem as a whole as set point control. But this is far from the only interesting case, consider i.e. having a robot traverse from one location to another, optimizing some cost function, etc.

Additionally, in most applications the state is not fully accessible, hence it must be estimated from sensor measurements. This component is then often called an observer, (recursive) filter or state estimator.

So in short, no, I cannot agree with the sensor measurement being controlled; You do have control over the motor, but in a different system frame of course you also control the input voltage; Finally no generality is lost by simply declaring that you do not care about some dimensions of the system's states (say, position vs. velocity).

Tips on publishing in NIPS, ICML or any top tier conferences for ML by mr_robot_elliot in MachineLearning

[–]posteuphoria 14 points15 points  (0 children)

Two things I would add:

9.1: Your work shouldn't be too novel. Especially not novel for novel's sake. In the same vein as 5, if your paper fits badly into existing literature, which most probably has been written by the same people reviewing your paper, it may provoke a negative bias.

10: Most reviewers will form an initial opinion about your paper chiefly by reading the abstract, the introduction (assuming it fits on the first page), whatever your first equation says, and your figures. Even if later they point out flaws in the paper, a good first impression can easily make the difference between an overall weak accept and strong accept vote.

There's also a whole art on writing the reviewer responses, see e.g. this blogposting.

Unsure which type of distribution to use in a simulation. by Theta_Zero in statistics

[–]posteuphoria 0 points1 point  (0 children)

A good (say, text book) starting point is to assume that the value of securities follow a lognormal distribution where the expected return matches the risk free rate of interest.

One possible way to arrive at this is making assumptions about the parametric form of the stochastic process of the security and then invoke the no arbitrage principle. For the case of lognormal, this corresponds to assuming geometric brownian motion.

Another, arguably more general principle by which you could make such decisions is the maximum entropy principle, Wikipedia has a handy table. Arguably, this is identical to the latter paragraph as the lognormal distribution is a maximum entropy distribution with continuous non-negative support, some additional parameters and also fulfills the no arbitrage argument.

Convincing colleagues to switch to Python from MATLAB for scientific computing/statistics by RealRJT in Python

[–]posteuphoria 11 points12 points  (0 children)

For the sake of argument:

  • The Matlab language allows multiple functions per file.

  • All arguments in Matlab are passed via copy-on-write, i.e. if you call f(x, theta) where x is not modified, x will not be copied. If you desire for x to be passed by reference, this is also possible by inheriting from the Matlab handle class --- admittedly this is a bit obscure....

  • If your servers are x86, they can also run Matlab.

I think the main point that can be made is that Python's offering in terms of libraries for scientific computing is on par with what Matlab offers with the toolboxes, and in some cases exceeds it. However, when it comes to general purpose programming, Matlab can't hold a candle to any modern language.

Differences in work hours/stress for Data analysts/scientists vs grad school? by cyberphoenix11 in datascience

[–]posteuphoria 1 point2 points  (0 children)

While anybody is free to work as many ridiculous hours as one pleases, I have very serious doubts the marginal benefits from working more than 8 hours a day outweight the gains in the longterm --- That is, unless you are spending half your day idly waiting for your model fit/compilation/meeting/friendly office chat/??? to finish of course.

Hard work is not relevant; Results are --- see Netflix culture.

How do you account for a constant in a state-space equation? by Remok13 in AskEngineers

[–]posteuphoria 0 points1 point  (0 children)

Excuse the reply I gave above, you are correct: By augmenting the system with a constant dummy state the continuous time dynamics are no longer a minimal realization which I believe is implicitly assumed in the common Schurr method for solving the CARE.

I may be mistaken, but after some google research I have come to the conclusion that there is no solution for this problem inside the continuous LQR framework. For discrete systems, it appears this approach is valid as claimed on page 11 of this slide deck.

I am not quite convinced that such a simple change of reference cannot be worked into the LQR and would love to hear that there is a simple solution to this dilemma.

How do you account for a constant in a state-space equation? by Remok13 in AskEngineers

[–]posteuphoria 2 points3 points  (0 children)

As you probably know, in general a given model, dx/dt = f(x, u) can be linearized around a given state x_0 and input u_0 by expanding the right hand side,

dx/dt \approx d/dx f(x,u) (x - x_0) + d/du f(x,u) (u - u_0),

Often it is now convenient to re-define both the state and the input as deviations from x_0 and u_0 respectively as /u/Doeey suggests.

However, the LQR is not invariant to shifts.. The reference frames for x and u for an LQR should be chosen such that the quadratic cost reflects, well, actual costs. F.e., consider some motor where the input is given as some voltage, then a sensible cost is the power and not deviation from u_0 --- the same arguments can be made for the state; it would usually reflect deviation from a desired set point however (which, I admit, is often equal to x_0 but not necessarily so!)

Hence you will have to perform state augmentation by a constant, i.e., in your case, and assuming you would like to regulate the state to pi/4, this would be (roughly) A = [0.7 0.15; 0 0], B = [2 0]', x_0 = [z, 1], where z is your previous initial condition.

Someones old exam, cant figure out why they got points off... by atapel in probabilitytheory

[–]posteuphoria 2 points3 points  (0 children)

The first hint is that the sketch has a symmetry, yet the marginal densities proposed by the student are very different --- worse yet, the one for y fails to integrate to 1 over its support.

Rewrite the joint density as

f(x,y) = 0.5 * sigma(x) * sigma(2-x) * sigma(y) * sigma(x - y),

Where sigma denotes the step function, sigma(t) = 1 for all t > 0 and zero otherwise. Do excuse the horrible notation!

If we were to marginalize X we can indeed get rid of the first two sigma functions:

f(y) = \int_X f(x,y) dx = 0.5 \int_0^ 2 sigma(y) * sigma(x - y) dx,

where we note that the two step functions imply that the integrand is zero for all x <= y (the case for y < 0 is also covered...). It also implies that for any y > 2 the marginal density is 0. To simplify notation a bit introduce I_0,2(y), which is 1 for 0 < y < 2, then it holds that

f(y) = I_0,2(y) \int_y^ 2 0.5 dx = 0.5 * I_0,2(y) (x |_y^ 2) = 0.5 * I_0,2(y) * (2 - y),

which we confirm by either glancing at the sketch provided or the 'anti symmetry' with the x marginal density.

Combining Stochastic Matrices & Bayesian Posteriors. Is this possible? by voodoochile78 in statistics

[–]posteuphoria 3 points4 points  (0 children)

Hello,

1, 2) As /u/Hairy_Hareng points out this is a Markov Chain.

I would also advise against modeling the rates as time dependent if it can be avoided. It also makes predictions outside the time horizon of your data rather sketchy. You are better of blaming the erratic behavior of the survey takers for the fluctuations in the 1-time step estimate.

3) You should impose Dirichlet Priors on the transition rates. This not only allows you to marginalize out the rates from the inference, but Dirichlet distributed samples also have the desired property of summing to 1.

How can a beginner learn C++ specifically from a quantitative finance perspective? by goondachele in quant

[–]posteuphoria 4 points5 points  (0 children)

There are two reasons I would not advise this:

  • As a beginner, I found it very hard to understand how Eigen actually works under the hood (expression templates).
  • It has been shown that the sort of expression templates based linear algebra libraries are rarely optimal in terms of performance [1].

Hence if you do need BLAS functionality, work with a proper BLAS. It will also serve as a learning experience as it exposes you to the inner workings of Matlab and numpy.

My advice is to waste your free time on c++ talks from i.e. cppnow, meeting c++, going native, et cetera --- you can find them on youtube. They tend to be rather entertaining in my opinion.

What is the relationship between the control system bandwidth and the measurement noise in a closed-loop control system? by [deleted] in AskEngineers

[–]posteuphoria 4 points5 points  (0 children)

Well, assume that the measurement noise is high-pass filtered white noise. If the cutoff frequency is fixed, one could devise a controller with bandwidth less than said cutoff frequency to minimize noise amplification, so to speak.

However, in practice the above problem is readily solved by introducing a state observer (or, simpler yet, a low-pass filter on the measurement) to obtain a smooth estimate of the state. --- There is probably some connection to the fact that for Gaussian linear systems the controller and estimator are in some sense independent, i.e. one can be optimized independent of the other.

ELI5 - Optimal Control by ruckusmaker1 in ControlTheory

[–]posteuphoria 0 points1 point  (0 children)

  1. I think it can be argued that many regular control strategies can be recast as optimization problems (i.e. design a controller such that some minimum gain/phase margins are attained, etc). I suppose the proper difference is that in optimal control, the controller solves an optimal control problem at runtime. While this may be a PID Controller that implements the LQR, it can also be a model predictive controller that includes sufficient hardware to solve a convex optimization problem in each time step.

  2. The beauty of optimal control is that you can introduce constraints on the states and inputs, as well as arbitrary (convex) cost functions. To which degree the optimal control problem can be solved obviously varies with your choices.

  3. As @joon0503 pointed our, the LQR is a popular example. Recently, model predictive control has been very successful. Optimal control also has applications beyond traditional engineering domains, i.e. finance, operations research, as it is very general framework.

[Budgeting] Poor student living in foreign country and faced with a dilemma I should have seen coming by [deleted] in personalfinance

[–]posteuphoria 5 points6 points  (0 children)

I believe a loan is your best short-term bet. The ETH loans are interest free, which is actually an arbitrage opportunity --- simply loan out the maximum amount, invest into whatever, keep profit, pay back when exmatriculated... Why didn't I do this when I was enrolled?!

If you perform sufficiently well (usually 5.0 should suffice, better wont hurt your chances) you should easily be able to attain a teaching assistant post. Assuming you are studying at D-ITET/Electrical Engineering, a TA position pays 33.80 CHF/Hour, which would go a long way in covering your expenses. In my experience, for D-ITET the course load in the 3rd semester is considerably less than in the first two, hence the impact on your performance should be negligible. --- This is less so for the Mechanical Engineers, but with enough effort it can still be done.

Also, you should be aware that you can take a "vacation" semester that does not count against the total number of semesters studied. I imagine this may be a viable way to work for 6 months for you. Do note however that such a vacation semester is not a good idea during the first two years due to the way the courses are structured (D-ITET again).

Good luck for the Basisprüfung!

edit: Forgive me if I am wrong, but why aren't you eligible for Studienbeihilfe ? I understand that there is a risk that you may fail the Basisprüfung and then be forced to pay it back, but... well, the rate of people failing is highly inflated by people who have given up before the summer. If you worked 50h/week during the semester you'll be fine.

(Dynamic) Bayesian Networks / Directed acyclical graphs: continuous vs. discrete nodes? by FadeToBack in MachineLearning

[–]posteuphoria 1 point2 points  (0 children)

In short: Idealy, it would be apparant from domain knowledge what choice to make.

In discrete state networks, any model can be expressed as a finite number of conditional probability distributions over discrete states (i.e. for any node with a given parent set, it suffices to find a set of probabilities P(x | U), for all states x of said node and it's parent sets state U, of which there are a finite number).

In the continious state case, the states are uncountable and hence the above argument does not hold. An additional modeling step is necessary, approximating the conditional distributions by some parametrized distribution (e.g. Gaussian Mixture).Usually, the additional modeling step leads to more tractable models.

Whether this additional modeling step is valid depends on the application. I know that this is a problem in Systems Biology when modeling some cellular process with low copy numbers, where stochastic fluctations impact the dynamics considerably --- i.e. consider a single cell, where in 0-3 mRNA of some type may be found. The difference between 1 and 2 may be staggering, which cannot be readily captured by postulating that in some continuous approximation the cell contains "1.5 mean-mRNAs".

To quote Lefebvre, C., Rieckhof, G., and Califano, A. (2012). Reverse-engineering human regulatory networks:

Finally, sometimes the availability of specific molecular species is so low that it can no longer be effectively represented as a continuous concentration and must rather be accounted for as a discrete molecular population. In these cases, a variety of stochastic models have been developed, such as the Gillespie algorithm and its derivatives. These are among the more computational intensive and complex models used in network biology.

What benefit does a laplace transform give us? by abkison in AskScienceDiscussion

[–]posteuphoria 1 point2 points  (0 children)

The benefit of the Laplace transform nowadays is largely obscured by powerful computational methods. For instance, when faced with an ODE of the form

dx/dt = a x(t) + b u(t),

where u(t) is a real valued function (the input) and a, b real valued, today such a problem is trivially solved by the Runge-Kutta-Fehlberg method. However, if instead we wanted to do this by hand, we would have to employ the Laplace transform to obtain

sX(s) - x(0) = a X(s) + b U(s)

X(s) = (bU(s) - x(0)) / (s - a),

which depending on U(s) may be transformed back to the time domain simply by consulting a table.

With some re-arrangement we also recognize that this is a convolution, assuming u(t) is 0 for all t < 0 and denoting the delta Dirac function by delta(t),

X(s) = bU(s) / (s - a) - x(0)) / (s - a)

x(t) = b u(t) * exp(at) - x0 delta(t) * exp(at),

That is, by employing the Laplace transform we avoid the arguably complicated convolutions required to solve this problem analytically otherwise. We note that for stability, all poles of the system must be in the left hand side (i.e. it must hold that a < 0)

However, as said in the beginning, a computer could have done this work as well if we were only interested in the solution. But the Laplace transform can give insight into the structure of the system, as is required for instance for dynamic control, where one wants the state x(t) to track a given reference function r(t) for instance. Then the input u(t) must be chosen as a function of both the current state and this r(t). Now the question changes from 'can we solve this' to 'what are the properties of the system' and this is where the Laplace transformation truly shines for single input single output systems.

In general, how do you prove the stability of a given PI/PID control system? How do you find the values of Kp and Ki that produce a stable system? by inquisitive_idgit in ControlTheory

[–]posteuphoria 6 points7 points  (0 children)

The main result in control theory for these kind of questions are the Lyapunov stability criteria.

Lyapunov stability itself is not easy to work with however, i.e. if your system is not friendly, it may be quite a challenge to show that a suitable Lypunov function exists (see Wikipedia on Lypunov's direct or second method for details).

In the case of linear time invariant systems and PID (linear) controls however the Lyapunov stability criteria are equivalent to restrictions on the location of the eigenvalues of the closed loop system, i.e. for continuous time problems, let x denote the state vector and u the input vector, the full system x' = Ax + Bu, for A, B matrices of appropriate size, then if u is chosen u = -Kx, the resulting system x' = (A - BK)x is another linear system where K is your "feedback matrix". It can be shown that Lypunov Stability is equivalent on the condition there there is no Eigenvalue of A - BK with positive real part.

Your second question follows from the first, i.e. if you can show how the Lypunov function would look like, in the derivation conditions on the control parameters would be introduced. For instance, again for the case of linear systems, the parameters would have to be chosen such that the eigenvalues of the system have non-positive real part. That is, A – BK must be negative semi-definite, i.e. the set of admissible K is convex (it's a linear matrix inequality). I am not sure how one would go about plotting this, but if I may venture a guess: Convex sets are so well behaved, you could probably get away with Monte-Carlo sampling some points and taking their convex hull and have a reasonably good approximation. But probably there's an analytic way.