Hacker Newsnew | past | comments | ask | show | jobs | submit | lexy0202's commentslogin

I'm still reluctant to use TypeScript given that it has a serious type narrowing bug that is two years old! You'd think Microsoft could have sorted this out by now.

https://github.com/Microsoft/TypeScript/issues/9998


What the author refers to as "randomization strategies" is in fact regularisation: a set of techniques to prevent over fitting.


Yes.


This. Running a script which takes hours to execute, only to find you have a TypeError on the last line just before you get the results you need is really frustrating. Static typing is a must-have imo.


you will probably like Nim - https://nim-lang.org/ if you like Static Typing in a pythonish language, and writing long running (perhaps CPU intensive) tasks.


Agreed


> I can probably write vanilla JS or Python code that does that in 10 lines or so and would finish in around 5 seconds.

Really? There are certainly frameworks that you can use to achieve this performance in that amount of code, but I would be really interested to see that in vanilla JS/Python.


Hey, sure - here's 9 lines of code that implement a perceptron. I get ~95% of precision after a second with 400 samples.

```js

     const dotSign = (v1, v2) => v1.reduce((prev, x, i) => prev + x * v2[i], 1) > 0 ? 1 : -1

    module.exports = (data, weights = Array(data[0].content.length).fill(0)) => {
      for(const {label, content} of data) {
        const delta = (label - dotSign(content, weights)) / 2;
        weights = weights.map((x, i) => x + delta * content[i]);
      }
      return { perceive: vector => dotSign(vector, weights), weights };
    }
```

I can upload an electron app that does this with mnist if interested.


> I get ~95% of precision after a second with 400 samples.

MNIST has 60k training samples and 10k test samples. Are you using only 400 of them? Is 95% the accuracy on the test samples or on the same set of training samples? I believe when we talk about MNIST accuracy, we always refer to the accuracy on the 10k test samples.


how long does does it take to get from 95% -> 98.8% though?


This. You can also get near 98% accuracy with vw and one quadratic interaction over the pixel space. It takes seconds. But that last .8%, forget about ever getting there with infinite training time.


About 10 seconds and 10 times the samples does that.


Is this not a binary perceptron? How do you plan to classify all 10 digits with this?


I cheated here (this _is_ a binary perceptron), but the conversion is super easy with one-vs-rest or one-vs-one (training all pairs and then doing pairwise comparison until we find the one that matches), that would still take ~20 seconds to train.



Disclaimer: I worked for this company.

StarLeaf (https://www.starleaf.com/) is a great alternative for businesses.


It would be great if you could have simulation objects inherit from one another - e.g. if you're making a weather system to have a generic cloud, and then have thunder cloud and rain cloud inherit from cloud.


Light (read: any electromagnetic wave) cannot escape a black hole beyond the event horizon. Therefore this wouldn't work.


Just have Anne toss you DVDs of Game of Thrones from outside the event horizon.


Netflix would have to get really creative with their business model to support those subscribers.


Couldn't Anne just beam an electromagnetic wave of TV/radio into the black hole to you, though? Nothing will be escaping the black hole.


but it can go in. You can still watch TV


I have done a quick and rough translation of the German article into English. Hopefully this is better than the Google Translate version: https://gist.github.com/alexcoplan/0018e3320f99a612c737


Much more readable than the Glenglish version -thank you.

I still don't understand "The crash is the worst accident since the development of the A400M", though. To me that implies there was a pretty devastating accident during the development.


This is not a translation error. This sentence has the same puzzling meaning in the German version.

I think it's sloppy journalist writing for the worst accident that happened with the development of the A400M.


That may be reading too much. Another reading is that Prior to development, the plane didn't exist.


This hangs and hogs the CPU on "Starting Docker VM" for me.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: