New answers tagged

0

After much consideration, I reached out the following points: Visualization of the first prediction's explanation shap.force_plot(explainer.expected_value, shap_values[0,:], X.iloc[0,:]) according to this doc shows:  1. features pushing the prediction higher are shown in red (e.g. $\text{SHAP}_\text{day_2_balance} = 532$), those pushing the prediction ...


0

You can train a decision tree with your features and target. Then just take the leaf of DT with the highest target rate, constrains on your features in that leaf will be your segment.


0

Create addition variable: Eg: lead_time-start_time can be time to book. Reduce variables with many classes if present (part of EDA) standardize numeric variables - (val-mean)/sigma Tree is a very weak classifier, you will have to do bagging or boosting (like ada boost or gbm or random forest try parameter tuning - I am not pasting any links since I don;t ...


0

It is not the number of features that is the problem with Gaussian Naive Bayes (GaussianNB). It is the decision boundary that GaussianNB is learning. Naive Bayes is constrained to the learn the marginal distribution of the data because "naive" assumption. Often times the conditional distribution is useful to make predictions. Given the performance ...


0

I think these are often used colloquially as synonyms, but let's try to find the differences. Each of them begins with "Time Series" (TS). So the difference lies in the three following terms. here with my interpretation: Analysis - wanting to describe and understand characteristics the observed data coming from the generating function$^1$. ...


0

Increasing tolerance will result in "higher root mean squared error value" most of the time. Increasing tolerance is telling the model it is okay to stop earlier with higher error and not continue the search for a possible more optimal solution using smaller updates.


0

The other answers make sense but I would be more categorically negative about the idea: Is this approach a correct approach, or logical with respect to machine learning principles ? No, it's not. The parameters of a ML model (whether supervised or unsupervised) are estimated using a particular set of features designed as the input for the problem. Changing ...


3

Is this approach a correct approach, or logical with respect to machine learning principles? It will affect the performance of the model in the sense that your algorithm learned to separate the clusters based upon distance according to all the features. I have read discussions about how to calculate feature importance on unsupervised problems like yours, so ...


1

Interesting question. The answer is: It depends. The best way to find out how it would affect your model is with the shap package. You can use it to uncover the importance of features and reveal interaction effects in the model. There could be a very different effect depending on how „important“ the excluded features are. Let‘s assume a very simple decision ...


0

The safest way to keep the same predictions for your older data is versioning your trained models. It is, keeping the generated model artifact (in python could be pickle file, h5 file, etc) to make sure that you can use it getting the same results as you say, and generating new models (so new artifacts) via retraining when new data come in. The usual ...


-1

The wording of the question is a bit vague, but I believe the machine learning term you are looking for is transfer learning, which is essentially recycling a previously trained model while adding new data. This is a common technique for data scientists to take advantage of existing models (oftne created by groups with much more data and resources, such as ...


0

Several mixed effects models are available for identification of interaction effects. However, you need to plan and implement a correct statistical design. Choosing an appropriate model in terms of fixed-effects or random effects assumption is crucial part of the process.


0

From a quick look, my guess would be that maybe they mine data from some predefined target websites, typically social media: twitter, facebook, etc. I could imagine that they capture trends in the sense of "what people are talking about" on social media platforms, but maybe they have other sources and methods. There are Natural Language Processing ...


1

Just to expand on @Ankita Talwar answer and give some slightly more formal intuition you can write a linear model with to regressors and their interaction as follows: $$ y = w_0 + w_1 x_1 + w_2 x_2 + w_3 x_1 x_2$$ where $x_1 x_2$ is the interaction term. Now refactoring you can see that the interaction can be absorbed into the coefficient for $x1$ making it ...


0

if you are fine with non-differentiable cost functions (or more precisely non-smooth) there is a simple and intuitive metric to use involving the step function $\theta(x)$ defined as: $$\theta(x)={\begin{cases}1&{\text{if }}x \ge 0\\0&{\text{if }}x < 0\\\end{cases}}$$ The cost defined with respect to the step function would be: $$L(\Delta t) = w \...


0

Interaction effect refers to the fact when two or more independent variables together impact the dependent variable. Interaction of two independent variables to affect the outcome variable is not affected by any relation between those variables. We might have a situation where two variables independently might not significantly impact the outcome variable ...


0

At the start, it'll be better to discuss the use-case with a Domain Expert, if possible, and decide if predicting Conversion Rates over a specific future time horizon say daily/weekly/monthly/quarterly/annually would make sense to your Business using historical data. In some use-cases, predicting over a relatively short term horizon of 1 day or week may be ...


0

I think you should first export it with a timestamp and then add a day, month ... other features to the data. This might help in better accuracy. For more details, you can refer: This article


0

@user575406's solution is also fine and acceptable but in case the OP would still like to express the Distributed Lag Regression Model as a formula, then here are two ways to do it - In Method 1, I'm simply expressing the lagged variable using a pandas transformation function and in Method 2, I'm invoking a custom python function to achieve the same thing. ...


4

The real problem is that you should not try to fit all your images in memory. Instead, you should small groups of images, normally called "minibatches", which can fit in the GPU/CPU memory. For that, tensorflow offers the function tf.keras.preprocessing.image_dataset_from_directory that loads images from a directory. I suggest you take a look at ...


0

Is it possible to create a predictive model for a dataset that consists of only positive occurrences of the dependent variable? One-class classification is a type of classification algorithm which does exactly that. In one-class classification the principle is to discover the patterns which characterize the instances of the class, assuming that everything ...


Top 50 recent answers are included