recommended books about curve fitting and interpolations ? [closed] - java

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am working on a java application where i need to do some curve fittings and interpolations. I don't have the theoretical statistical background about that. I appreciate it if anyone can recommend good books covering this topic, but not very advanced ones. If the book provides coding examples in java, it would be greater.

I am not sure of what books to read, but one good place to start would be to look into fitting a Spline. However, the variations on this technique are used to model as closely as possible a curve. For example, Dentists might find this technique very useful.
If you are looking for predictive capabilities, this is an example of how to implement a linear regression. Which, depending on your ultimate goal would be another good place to start.

It is hard to recommend without knowing your mathematics ability, but if you want to understand these concepts you will at the very least require a grasp of linear algebra. I would recommend this book http://www-maths.mcs.st-and.ac.uk/~gmp/gmptheo.html . It describes interpolation and approximation and has some sections on splines which you may find useful. It is aimed at an undergraduate mathematics level - some of the chapters may not be useful to you but if nothing else it will at least highlight the concepts that you need to know in order to understand the things you want to know about. If you find this too advanced, (if you do not have A-level maths or the equivalent) then perhaps consider an introductory text on linear algebra as this is probably the most important concept to understand and is central to approximation and interpolation theory. There are also probably a great many good tutorials available online.

Related

Why does Java Boolean implement Comparable? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
In Java, operators <, >, >= and <= are not defined for the primitive boolean type.
However, the corresponding wrapper class Boolean implements Comparable.
That is: true > false
is an error, but Boolean.TRUE.compareTo(Boolean.FALSE) > 0 is fine.
How come?
Did the language designers change their mind?
Why keep the incoherent behavior, then?
Although arbitrary, I can think of advantages to having a total order defined for booleans.
Are there any disadvantages?
Programming languages are not mathematical constructs. They are complex projects spanning many years and a lot of different people. As such, they are subjected to opinions, legacy, disagreements, hype cycles, influences of other languages, poor communication, and unfortunately sometimes also to mistakes and stupidity. You could argue that most decisions about a language are in fact arbitrary.
Your question is perfectly valid: why is it like this? Unfortunately without asking people who made the relevant commits how much they can still remember is not really a viable option. So your guess is as good as anybody else's.
It is what it is, but you are entitled to have your own opinion. Sadly, such inconsistencies can be in some cases frustrating to the point when people abandon a language and create a new one. But since computers are physical, limited things, any new language will also be imperfect and opinionated.
If you ask me, having a total ordering on boolean is a good idea - it wouldn't hurt anybody, while it could provide some limited benefit in certain (although very narrow) cases. But there are many more, much much bigger issues with Java. As it stands, I don't think Oracle will risk breaking any existing programs by changing this behaviour.

Design SuperHeroes game [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Question might be silly for experts but please help me with pointers if it is already solved somewhere.
Interview Question : "Design class diagram in best possible way"
You need to design a game "SuperHeroes".
Super hero examples are Batman, Spider-Man, Thor, Hal Jordan, Wonder Woman, Captain America .... n
Spiderman can jump, crawl, generateFire ....n
Batman can jump, crawl, fly .... n
Thor can swim, fly .... n
There can be millions of behaviour.
There can be millions of Super heroes.
Some have few behaviours common in them and some specific to hero.
Design should be flexible enough to add behaviours to the super heroes
Important point to focus was told that "System should be scalable"
I tried twisting decorator pattern to accommodate problem requirements but was failing at many places, also I have to make many interfaces for this, so scalability was questionable.
I tried another approach as Writing all behaviours in one class(If require will classify behaviours in respective classes, kind of utility class which will have all implementations of behaviours). and an Spiderman class which will have list of allowable Behaviours(kind of enum). and it is allowed to call methods from behaviour utility only if such behaviour is allowed in list. I think it is not a good approach.
Please help me with best way to achieve this.
If I understood the question correctly, the problem could be solved with the mixin pattern; however, multiple inheritance is required for a straightforward implementation, which is not available in Java. The subject is discussed in this question.
In games it is pretty easy to get a very huge inheritance tree up to the point, where it is very difficult, if not impossible to add a new entity with a different behaviour. To solve this, something called the Entity Component System is used. It is very flexible, does not limit you to inheritance and is commonly used in larger games.
There is also a follow-up article that describes a specific implementation, and has examples on how it can be used in different situations.

Shrink an image to 1/4 of its original size. [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I am a programming newbie. I am asked to shrink an image to 1/4 its original size. And tutor told me I can replace 4 pixel with one pixel, so as to make it 1/4. How Can I do replacing work in java. Can anyone give me an example?
If you are new to programming then this is absolutely a lesson you should not be undertaking because it involves file IO, loops, data structures, and math. None of these are relevant to the basics you should be learning now.
The basic algorithm would be that you read the pixels in the image into a matrix, and every 2x2 square of pixels could be replaces by one pixel by averaging the colors.
I am not going to give you a full answer because it would involve lots of API lookups to create a fully functional application to do this. There would be a lot of code you probably wouldn't even understand if I showed it to you.
If this is for school, you are either far behind in your studies, or else your teacher is giving an unecessarily complex early assignment. Regardless of where this is coming from, you need to ask for a simpler assignment.
Either way, I recommend you take a step back and solve some simpler problems first so that you understand the components necessary to solve this problem.

Head First Design Patterns vs Head First Object Oriented Analysis and Design [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Currently I am in the process of learning Java via Head First Java and am beginning to look ahead at reading more about OOP / design patterns.
My question is which book I should pursue after Head First Java. I am torn between Head First Design Patterns and Head First Object Oriented Analysis and Design. No doubt, I probably should read both, but I am not exactly sure what the difference is between the two and which would be more suitable as a follow up to Head First Java.
Any suggestions or details from those who have read these would be greatly appreciated.
Start with Head First Object Oriented Analysis and Design. The reason being some design patterns require a good knowledge of object oriented programming beforehand.
Now you are stepping into development territory its not only important to read but to also work through your own examples. For example trying to write a piece of software to do something is far more productive than reading 300 pages from a book. Learning about software is very practical so its important to apply what you are learning.
Generally a lot of books rehash the same principles, but if you like the style of the Head First books then by all means read them. If your at all interested in the Java programming language I would recommend a book called Effective Java by Joshua Bloch.
First of all, I love those books, so great choise :-) "Head First Design Patterns" speaks only about design patterns, "Head First Object Oriented Analysis and Design" contains a lot more like requirements engineering, testing etc. So if you want to learn OOP, then I would suggest to choose the design patterns book first and then the other one.

Plain-English tutorial on artificial neural networks? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I've Googled, StackOverflowed, everything, and I cannot seem to find a tutorial I can understand. I understand the concept of genetic algorithms, and how to implement them, (Though I haven't tried) but I cannot grasp the concept of neural networks.
I know vaguely how they work... And that's about it. Could someone direct me to a tutorial that could help someone who has not even graduated middle school yet? Sure, I'm several years ahead of the majority of people my grade, but I don't understand summation, (which I apparently need if I don't want a simple binary output) vectors, and other things that I apparently should know.
Is there a simple, bare-bones tutorial for neural networks? After I learn the basics, I'll proceed to more difficult ones. Preferably, they would be in Java.
Thanks!
Summation is just adding up a bunch of things. So,
Summation(1,2,3,4,5) = 1+2+3+4+5 = 15
(note: it's always adding: if you want to subtract, do a summation with negative numbers)
That was easy, right? ;)
A vector is an ordered tuple, which really just means it's bunch of numbers in a specific order. Most often seen in physics to describe position, force, velocity, etc... it's really nothing special, just some ordered numbers, where the ordering is significant:
v = <1,2,3>
If we are talking about geometry, then this vector represents a point in 3-dimensional space where the x coordinate is 1, the y coordinate is 2, and the z coordinate is 3 (See that was easy too, right)?
In neural nets, the vector is usually the vector of inputs to a neuron, so it's really just a list of numeric values. The summation of the vector would be nothing more than adding up all of the values in the vector and getting a single number as a result (which may be referred to as as "scalar" value).
(this was rushed and simplified - I'm sure someone else will help me refine it ;) )
PS. Kudos to you for diving into this stuff at the middle school level! :)
Well, there is this article in Wikipedia's Simple English, but I think you know already all that it contains.
I've had the same problem for a while. I'm a high school student, so you're a little ahead of me. I got a vacation and I used it to learn all I could on backpropagation, and I've found almost no resources that really help too much unless you want to read so much calculus that you want to die. My advice is to first write a perceptron, which is a network with only input layers and output layers. This inspired me o write a post, so hopefully within half an hour of my posting here there should be a tutorial on http://certioraomnia.blogspot.com/. It may be a little late as this question was asked three years ago, but it may help others later.

Categories

Resources