Machine learning in trading: theory, models, practice and algo-trading - page 3341

 
Maxim Dmitrievsky #:

After all, you weren't banned from google, were you? You can read how statistical inference differs from causal inference, right?

Maxim Dmitrievsky #:
Let's get to the point: What is the difference between associative and causal inference?

The author has bothered to state the limits of applicability of linear regression. Minus point.

Meta students are not an ensemble of models, minus a point.

What other section of the book do you disagree with, or rather what else did you not understand from the book?

You, of course, are the greatest guru and can afford to give people points, but I can't, once again writing specifically in the expectation that you will respond specifically as well.


What other section of the book do you disagree with, or rather what else did you not understand from the book?

I have never written anywhere that I disagree.

I am against new labels for well known concepts

It's all there and putting fog on known things is very unhelpful.

The author bothered to state the limits of applicability of linear regression. Minus a point.

Did not see in the text:

1. linear regression is applicable to stationary random processes

2. the residual from fitting linear regression must be normally distributed.

If this is not the case in his examples, and the converse is not stated, then a pittance of all his reasoning.

All the reasoning in the book about cause and effect is the usual "false correlation" reasoning


Meta Learnersis not an ensemble of models, minus the score.

According to the text of the book,"Meta learners" are the result/outcome of fitting/predicting conventional models. Had the author not once again labelled the most ordinary concepts with new labels, there would have been an opportunity for me to express my thoughts more accurately.

So I will clarify.

The ensemble of models is an old and well established idea. The input is the output of lower level models, the output is a signal. There are many methods of combining the results of lower level models - combining "meta learners". The author considers three variants of combining the results of fitting, the second and third variants combine the results of the gradient bousting model. In the third variant, the outputs of the first level are combined according to the

Here is this unintelligible text is the meaning, the novelty in all this:

def ps_predict(df, t): 
    return g.predict_proba(df[X])[:, t]
    
    
x_cate_train = (ps_predict(train,1)*mx0.predict(train[X]) +
                ps_predict(train,0)*mx1.predict(train[X]))

x_cate_test = test.assign(cate=(ps_predict(test,1)*mx0.predict(test[X]) +
                                ps_predict(test,0)*mx1.predict(test[X])))
 
mytarmailS #:

Well that's the question, there's an asociation on the face of it...
How do you know if it's just an asociation or if it's actually AB causing C

It's not clear if these lines are immediately known or if they appear one letter at a time. What causes these letters to appear. If it is just a sequence of patterns, the task does not look very formalised. Why was the string length chosen and all that. Maybe the data is not represented in the right form at all.

read the book, maybe you'll find the answer.

 

Sanych, kozul is a complex topic, not only everyone can understand it at a glance. If you do not understand something, it does not mean that there is something wrongly written there.

Don't suffer if you don't want to. Otherwise it turns out like in the parable about beads.

 
Maxim Dmitrievsky #:

Sanych, kozul is a complex topic, not only everyone can understand it at a glance. If you don't understand something, it doesn't mean that there is something wrongly written there.

Don't suffer if you don't want to.

Kozul - this is an advertising move and the whole book is nothing more than an advertisement of the unusual novelty of the novelty of the most usual provisions of mathematical statistics. But mathematical statistics is a really difficult subject.

Here is the result of hundreds of pages of text:

To the code at last! First, we have the first stage, which is exactly the same as the T-Learner.

from sklearn.linear_model import LogisticRegression

np.random.seed(123)

# first stage models
m0 = LGBMRegressor(max_depth=2, min_child_samples=30)
m1 = LGBMRegressor(max_depth=2, min_child_samples=30)

# propensity score model
g = LogisticRegression(solver="lbfgs", penalty='none') 

m0.fit(train.query(f"{T}==0")[X], train.query(f"{T}==0")[y])
m1.fit(train.query(f"{T}==1")[X], train.query(f"{T}==1")[y])
                       
g.fit(train[X], train[T]);
Now, we impute the treatment effect and fit the second stage models on them.

d_train = np.where(train[T]==0,
                   m1.predict(train[X]) - train[y],
                   train[y] - m0.predict(train[X]))

# second stage
mx0 = LGBMRegressor(max_depth=2, min_child_samples=30)
mx1 = LGBMRegressor(max_depth=2, min_child_samples=30)

mx0.fit(train.query(f"{T}==0")[X], d_train[train[T]==0])
mx1.fit(train.query(f"{T}==1")[X], d_train[train[T]==1]);
Finally, we make corrected predictions using the propensity score model.

def ps_predict(df, t): 
    return g.predict_proba(df[X])[:, t]
    
    
x_cate_train = (ps_predict(train,1)*mx0.predict(train[X]) +
                ps_predict(train,0)*mx1.predict(train[X]))

x_cate_test = test.assign(cate=(ps_predict(test,1)*mx0.predict(test[X]) +
                                ps_predict(test,0)*mx1.predict(test[X])))

As far as I understand programming, the code given is NOT working code: functions that don't know where they come from, results are not assigned to anything, function arguments are from scratch.

 
"...lest they trample it with their feet and turn round and tear you down"
 

Maxim is hopelessly incapable of having a substantive discussion.

Is there anyone on the forum who understands the copy of the code from the book I have given?

I myself apply different approaches to combining the results of several models, I know but do not apply some more, but I have not seen something similar, maybe because of the incomprehensibility of the code.

 
😀😀😀

Has the denial phase, the one after surprise, started to end yet? It's taking a long time. When will the acceptance phase start?
 

A marvellous section in the appendix to the books, speaking of the utter uselessness of all this cajuela:

"

Why Prediction Metrics are Dangerous For Causal Models".

and the conclusion of the section:

In other words, predictive performance on a random dataset does not translate our preference for how good a model is for causal inference .


Yandex translation

Why predictive performance is dangerous for causal models

In other words, prediction performance on a random dataset does not translate our preference for how good a model is for causal inference


I.e. for the author the most important thing is the causal inference itself, and trying to use it spoils the beauty of the whole construction.

Cheat!

 
This is just saying that through over-trained models, with a large number of confounders, causal inference is complicated. I've written about this several times. And it's perfectly natural. And even optimiser people argue about such simple things. Well, that's if you read it and not take it out of context.

But it's not comical to discuss anything at all with sputtering droolers. You're just so narrow-minded. Even though you don't know who a teacher is and confuse ensemble with staking.

You don't even distinguish matstat from kozul, for you everything is the same (due to ignorance).

How long have you been interested in MO in general, in terms of time? Purely out of idle interest. Can you write a classifier yourself or build an NS of arbitrary architecture from a constructor like Pytorch. Or at least your own tester? It's a mystery covered with darkness.

That is, what can you oppose to the author of the book? Why should you be listened to and not him, for example)?
 
Google's new product, TSMixer, seems to outperform TimeGPT in benchmarks, just started reading.