New answers tagged

2

Weka's decision trees are from the Quinlan family, whereas sklearn uses CART. The most notable difference is that Quinlan trees aren't restricted to binary splits: a categorical column will be split into subtrees for each level. Another is how missing values are dealt with, but there are some differences in individual implementations, so it's not ...


1

When you do not have any target, and you want to label them as trustworthy or not, so here you are using your psychology that when customer is not earning money, or not married, then he/she is a bad customer. But manually labeling the datasets with this psychology may or may not be correct. Because you do not have any target variable to validate your ...


2

Use Clustering under unsupervised learning. That will categorize the customer based on similar parameters. You can define the number of cluster you need to form, in you case it is two(trustworthy and not). If there are more features it will be more helpful for the algorithm. This might help. https://towardsdatascience.com/an-introduction-to-clustering-...


2

Similarly to NB or kNN, the DT and SVM algorithms work with the features which are provided as input. So whenever ML is applied to text it's important to understand how the unstructured text is transformed into structured data, i.e. how text instances are represented with features. There are many options, but traditionally a document is represented as as a ...


1

I may be a bit late to the party. Yes, I would say this is correct. Decision trees are prone to overfitting. Models that exhibit overfitting are usually non-linear and have low bias as well as high variance (see bias-variance trade-off). Decision trees are non-linear, now the question is why should they have high variance. In order to illustrate this, ...


7

This is an implementation detail, and I wouldn't necessarily rely on this behavior, but presently in sklearn, it will choose the "first" class. The predict method calls for the probability prediction, then takes the argmax, which in case of ties takes the first one: https://github.com/scikit-learn/scikit-learn/blob/fd237278e/sklearn/tree/_classes....


0

I don't think there is any way of doing that with decision trees, because that's not how decision trees work: the predicted label is not the result of some linear combination of the features. Instead you can look at the actual decision tree that the model represents and see which features have been used to classify a particular instance.


1

I would try two different approaches: interpolate the missing values on a user level. work with the sunset of rows for which we actually have the glucose level. Then, I would compare the test accuracy of the model built with both methods. Remember that your test set has to be composed of rows for which you have the glucose level - you cannot build it with ...


1

I would use temporal difference learning from reinforcement learning. Temporal difference learning employs TD propagation rather than backpropagation. The difference being that TD takes into account the time delay aspect. In fact, it is likely in this scenario that combining the two propagation methods would be optimal.


0

The quality of the score depends on the context of the project. One approach is a model comparison approach. Define a baseline model. Then see if Decision Tree Regressor is better than the baseline.


1

High Variance - Model varies a lot on small changes High Bias - Model doesn't vary so much but predict quite away from the truth Let's check a Decision Tree on 5 values - \begin{array} {|r|r|} \hline 1 &5 &10 &15 &20\\ \hline \end{array} In this tree split, Value of 9.9 will be 7.5 Value of 10.1 will be 12.5. Showing a very high ...


0

Since (most) tree-based methods only care about the ordering of values in each feature, replacing your infinite values with very large values (larger than any finite value of the feature) is fine. Of course, you'll have to do some thinking of whether df[col1]/df[col2] should actually be treated as $\pm$inf when col2 is zero, and nans can just be left in for ...


Top 50 recent answers are included