Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Logistic Regression with Gradient Descent question.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I'm trying to implement Logistic Regression with Gradient Descent. But the w value is getting apparently random values when I run the code. I know I'm doing something wrong, for instance I don't know the proper value for ALPHA and an initial value for MAX_ANGLE. So I hope you guys help me to set this up properly.

What am I doing wrong?  I know I'm doing something wrong, for instance I don't know the proper value for ALPHA and a proper initial value for "w". So I hope you guys help me to set this up properly.






points.txt


The output:
 
Marshal
Posts: 25150
64
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I never heard of "Logistic Regression with Gradient Descent" before, so I spent a minute or two reading up about it.

I got far enough to realize that your code was meant to implement stochastic gradient descent, but really all that I can say is that it would be very easy to make an error while converting those calculations to Java code.

However it seems like you don't know what output is supposed to come out of that code, so I suppose there's a possibility that it's actually correct? Given that you have random inputs, it maybe isn't surprising that the outputs look "random"?
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isnt this the type of stuff matlab/python was made for?
 
Grow a forest with seedballs and this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!