Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Josh William

Greenhorn
+ Follow
since Sep 25, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Josh William

I believe the reasons for choosing Python over R/Matlab/Octave for presenting machine learning within texts is more to do with availability and accessibility than technical capabilities or suitability of the languages/tools. All can do the job as far as the texts are concerned, but Python is more widely obtainable than commercial alternatives, is cross platform (though so are the others that are listed), and has more "conventional syntax" given other mainstream programming languages.

I have typically favoured Matlab over Python due to a lot of convenient built-in features of the program and widespread support of state of the art machine learning methods; but there are many features within Python that come in handy, particularly when developing larger machine learning applications, where data structures and design patterns take on a larger role.

Besides, once you know the underlying principles of the machine learning techniques you are interested in, I can't really see how using any of these tools/languages would cause any great disadvantage compared to another. The worst case would be that the technique requires extra work since it is not implemented/included within your chosen environment or is "less implemented" (i.e. there are less building blocks, which need to be first developed before bringing them together as a complete implementation).
8 years ago
No. Appendix A gives you all you need: "Getting started with Python".
8 years ago
Yes, in their most raw form: empirical data (input), mathematics (largely statistics giving the algorithm/process used in "learning"), inference (output/estimate).

Essentially the philosophy is that the underlying process that determines an outcome that we wish to derive is unknown or very complex. By using empirical data and a certain amount of mathematical/statistical sophistication we can arrive at an estimate that is more accurate on average than a hard-coded (i.e. non-learning based) algorithm. In many cases, we do not know enough about the process to even write an algorithm to describe it adequately; instead, we "let the data speak for itself" in determining a mathematical relationship.
8 years ago
Yes; machine learning stemmed from AI. Wikipedia provides a reasonable explanation of what machine learning is and should give you an understanding of its relationship with AI.

From Wikipedia: "Machine learning, a branch of artificial intelligence, is a scientific discipline concerned with the design and development of algorithms that allow computers to evolve behaviors based on empirical data, such as from sensor data or databases."
8 years ago
There does not appear to be any focus on time series analysis/prediction within the book. Time series analysis seems to be more of a niche to warrant any extensive coverage within a general machine learning book. But there are a number of books that either focus on it or give it substantial treatment, however they typically assume strong familiarity with machine learning and statistical methods in general so they are not as introductory.
8 years ago
In chapter 2 of the book "Machine Learning in Action", section 2.3 has an example of handwritten digit recognition using knn.

I have not implemented this described method, however I have some basic experience with handwritten digit recognition, particularly relating to the framework described by Belongie et al.[PDF]. I have implemented the approach by Belongie et al. and obtained an error rate of ~8% against a small subset of the MNIST handwritten digit database (the published error rate of the approach is 0.63%, but this is due to a significantly larger training set comprising of 60,000 digits).

Given the simplicity of the approach described in the book and the relatively small training set I was surprise to read that it was able to obtain such outstanding performance (1.2% error). What can be attributed to the performance differences of the two approaches? Is it the larger number of exemplars within the training set, differences in complexities between the data sets, or something inherent to the approach that I missed?

Thanks
8 years ago
Thanks for the help guys.

What caused the confusion was the careless naming of my class 'Character'.

So, two things to note from all of this:

1. Subclasses do **not** inherit their corresponding superclass' import statements. If you want to use something outside of the local package, you must import it -- no exceptions.

2. Be careful not to name classes with existing class names from implicitly imported packages; such as java.lang.*


Changing the class name 'Character' to 'Creature' (as well as all references to Character) and importing the Creature class fixed this problem.

Thanks again
11 years ago
Hi Guys,

I'm trying to learn more about inheritance and abstract classes, and in doing so I have stumbled upon a problem. Although I know ( -or- at least think I know) how to 'fix' the problem, I would like to know what is causing it.

The problem arises as follows:

I have three classes; Character (abstract), Monster (abstract) and Goblin (concrete) - with inheritance hierarchy, Character <-- Monster <-- Goblin (parent left, child right). The (abstract) Character class declares two abstract methods fight(Character opponent) and move(int distance). These methods are implemented in the concrete class Goblin (with identical method signatures). When I try to compile the Goblin class, the compiler complains, stating that the Goblin class is not abstract and does not override the abstract method fight(adventure.Character) in the adventure.Character class.

Now to fix this, I can add an import statement (import adventure.Character .

Why do I need to do this?

Isn't the Character class imported via inheritance from the Monster class?

Code and compiler output below.



Thanks


Character.java


Monster.java


Goblin.java



$ javac adventure/monsters/Goblin.java
adventure/monsters/Goblin.java:5: adventure.monsters.Goblin is not abstract and does not override abstract method fight(adventure.Character) in adventure.Character
public class Goblin extends Monster
^
1 error

11 years ago