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

Since LLMs have been trained on plenty of science fiction and role-playing, one thing they can do is role-play a science fiction scenario using the tools they are given. i.e. if some text accidentally resembles this, it may be continued like this.

Role-play need not apply. Role play is a meta construct that is a representation of real world actions.

For example does it make any sense to remove any training data relating to people escaping jails?

How about intelligent animals escaping cages.

You're talking about emergent large scale patterns from self similar small patterns (fractals). LLMs are pattern matching machines, how are you going to remove those small scale patterns and at the same time get a useful general intelligence?


I'm sure Polars is great, but I can't get over needing 10 characters of ceremony every time I want to refer to a column in a data frame.

pl.col("...")


Sure, but these ten characters let you treat columns as values and do math on them, which is super intuitive, in my opinion. I've been using Pandas for quite some time and always kinda sucked at it. One day I decided to give this new library Polars a try. Now I can do things I couldn't even dream of with Pandas! And it's fast, too!

I think of `pl.col` as delayed evaluation: I want to do math on the vector of values of this column. But wait, let me just refer to the name of that column and build the expression that I want to compute. Then I hand this expression to Polars and it retrieves the actual values of the columns my expression refers to and executes the operations.

IMO, it would've been great to just do math on strings, like `"Amount" * "Price" - "Losses"`, but programming languages either don't allow math on strings or that math is actually string concatenation, which is not what we want. So we have to wrap the name of the column into some object. This is just an API thing.

As a side note, it's such a pity that there's basically no Polars for the Julia language! There is some wrapper package, but it seems old and unmaintained. I can't seem to properly learn DataFrames.jl for some reason, I always miss Polars when I use Julia.


You should look into dplyr [1] (part of the tidyverse) in R to see how intuitive this can get. You can do math directly on columns:

  df |> dplyr::mutate(profit = Amount * Price - Losses)
For Julia, take a look at TidierData.jl [2], which provides similar tidy syntax via macros.

[1] https://dplyr.tidyverse.org/

[2] https://tidierorg.github.io/TidierData.jl/latest/


I've seen people with exactly that frustration use "import polars.col as c" and use c("colname") instead!


Yes, this (as the even shorter c.colname) and the fact that you can do var= in place of assign in with_columns/agg changed my whole outlook on polars. Have been using it as my main driver for the past year.


Or c.colname


Every time:

   import polars as pl
   
   from polars import col, lit


c = pl.col

c.foo + c.bar


Nice. This is close enough to an R level of brevity, without any R dark magic.

Would be a great addition to the cheatsheet.


A comment by Norbert Wiener on translation machines (published 1993 but written somewhat earlier in "Invention: The Care and Feeding of Ideas"):

"Thus the effect of the machine of this sort in intellectual work may be to decrease the number of first class brains needed but to increase, and greatly increase, the demands made on these brains."


It's nice to see sparse interpretable LLMs being made.

This is similar to factor rotation in factor analysis (or PCA). A varimax rotation, for example, can produce an equivalent factor analysis with sparse loadings, and which is generally more interpretable. Fortunately for us the world is not just a complete mess, and sparse loadings can often be found. There seem to be "natural" concepts that we have observed rather than invented.

(Many examples in other simple machine learning methods too, I am sure.)


This advice can also be applied to PhD thesis examinations and paper reviews.


My dad is in his 80s. He keeps careful notes on how to use devices like tablets and TVs. There might be a touch of engineer-brain at work here, but the struggle is very real. He generally wouldn't take in all of the text and symbols on a screen if there is a lot of going on, or might get hung up on the wrong parts of it. He generally wouldn't find a modern interface at all "intuitive".

Any change to an interface is going to disrupt this, so one thing would be to change the interface only very rarely and carefully.


For linear models, least squares leads to the BLUE estimator: Best Linear Unbiassed Estimator. This acronym is doing a lot of work with each of the words having a specific technical meaning.

Fitting the model is also "nice" mathematically. It's a convex optimization problem, and in fact fairly straightforward linear algebra. The estimated coefficients are linear in y, and this also makes it easy to give standard errors and such for the coefficients!

Also, this is what you would do if you were doing Maximum Likelihood assuming Gaussian distributed noise in y, which is a sensible assumption (but not a strict assumption in order to use least squares).

Also, in a geometric sense, it means you are finding the model that puts its predictions closest to y in terms of Euclidean distance. So if you draw a diagram of what is going on, least squares seems like a reasonable choice. The geometry also helps you understand things like "degrees of freedom".

So, may overlapping reasons.


Best meaning the ‘least variance’, where variance is calculated based on the sum of squared residuals. There is a circularity in that definition.


A note mostly about terminology:

The least squares model will produce unbiassed predictions of y given x, i.e. predictions for which the average error is zero. This is the usual technical definition of unbiassed in statistics, but may not correspond to common usage.

Whether x is a noisy measurement or not is sort of irrelevant to this -- you make the prediction with the information you have.


535.491…^i = 1


R is so good in part because of the efforts of people like Di Cook, Hadley Wickham, and Yihui Xie to create an software environment that they like working in.

It also helps that in R any function can completely change how its arguments are evaluated, allowing the tidyverse packages to do things like evaluate arguments in the context of a data frame or add a pipe operator as a new language feature. This is a very dangerous feature to put in the hands of statisticians, but it allows more syntactic innovation than is possible in Python.


Like Python, R is a 2 (+...) language system. C/Fortran backends are needed for performance as problems scale up.

Julia and Nim [1] are dynamic and static approaches (respectively) to 1 language systems. They both have both user-defined operators and macros. Personally, I find the surface syntax of Julia rather distasteful and I also don't live in PLang REPLs / emacs all day long. Of course, neither Julia nor Nim are impractical enough to make calling C/Fortran all that hard, but the communities do tend to implement in the new language without much prompting.

[1] https://nim-lang.org/


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

Search: