I have a dataset from which I try to predict one value. I tried linear regression, but it doesn't work.

Is there an algorithm in Python which will compute a good statistical model (neural network) in every case? What I am looking for is the brute force algorithm for machine learning. The only thing I care about is how good the prediction is.


closed as off-topic by Juho Kokkala, John, gung, Silverfish, Sean Easter Apr 15 '16 at 14:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – Juho Kokkala, John, Sean Easter
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ This question is way too broad, how does you dataset look ? what are your target variables, do you have any prior knowledge on the constraints? what is your loss function ? $\endgroup$ – Uri Goren Apr 15 '16 at 12:44
  • $\begingroup$ This is this dataset : kaggle.com/c/bike-sharing-demand/data?train.csv $\endgroup$ – Moebius Apr 15 '16 at 13:11
  • 1
    $\begingroup$ I have voted to close this as too broad, but I wonder whether it is salvaged in some ways by Zach's answer. I also wonder if we have a duplicate question somewhere where someone asks for a technique that would work on any dataset, and there was a similar response? $\endgroup$ – Silverfish Apr 15 '16 at 13:52

In short, no. There's a "no free lunch theorem" in machine learning that there's no a-priori distinction in machine learning algorithms.

The best technique is usually to try a wide diversity of algorithms on your dataset, and pick the one that seems to give the best out-of-sample error.

scikit-learn contains great functions for doing this. I suggest you try a random forest first. Those often give pretty good results on real-world, tabular data.

  • $\begingroup$ You're probably right. I'm sad you are right, but I have to admit it. Thanks ! $\endgroup$ – Moebius Apr 15 '16 at 13:13
  • 3
    $\begingroup$ (+1) Perhaps worth emphasizing that the no free lunch theorem applies to your "best technique" too. $\endgroup$ – Scortchi Apr 15 '16 at 13:27
  • $\begingroup$ Random Forest improved my results a lot ! $\endgroup$ – Moebius Apr 15 '16 at 16:20
  • 1
    $\begingroup$ @Scortchi Totally correct! It's a tricky problem. $\endgroup$ – Zach Apr 18 '16 at 13:43
  • $\begingroup$ @Moebius Glad to hear that! $\endgroup$ – Zach Apr 18 '16 at 13:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.