sábado, 28 de março de 2020
VOODOO KID
There's something incredibly fun and full of life about Voodoo, or at least the pop-culture depiction of it. For an approximation of a religion that features zombies, death magic and the afterlife the festival atmosphere is palpable. Voodoo Kid (1997, Infogrames) puts that fictionalised framework into a traditional point-and-click adventure with a 'scary tale' of a pre-teen having a particularly spooky sea-bound nightmare.
Read more »
Download Tekken 6 Full Version For Pc
Download Tekken 6 Full Version For pc
Tekken 6 Full Review
Tekken 6 Full Review
Welcome to Tekken 6 is one of the best fighting game especially for fighting lovers that has been developed and published by Bandai Namco Games.This game was released on 26th November 2007.
Screenshot
System Requirements of Tekken 6 For Windows PC
- Operating System: Windows XP/Vista/ Windows 7 ( 64 Bit )
- CPU: Intel Pentium 4 or later.
- Setup Size: 700 MB
- RAM: 1GB
- Hard Disk Space: 1GB
Tech Book Face Off: Getting Clojure Vs. Learn Functional Programming With Elixir
Ever since I read Seven Languages in Seven Weeks and Seven More Languages in Seven Weeks, I've been wanting to dig into some of the languages covered by those books a bit more, and so I've selected a couple of books on two interesting functional languages: Clojure and Elixir. For Clojure I narrowed the options down to Getting Clojure by Russ Olsen, and for Elixir I went with Learn Functional Programming with Elixir by Ulisses Almeida. You may notice that, like the Seven in Seven books, both of these books are from The Pragmatic Programmers. They seem to pretty consistently publish solid, engaging programming books, and I was hoping to have more good luck with these two books. We'll see how they turned out.
Programming books that aim to teach a language from front to back can easily fall into the trap of spending too much time on all of the gory details about the language's arithmetic and logic systems or every possible control structure. Maybe it's because Clojure is a simple and straightforward language that doesn't have the complications that other languages have in these areas, but this book was a very easy read through these normally tedious parts. Olsen assumes the reader is already a programmer with a couple languages under their belt, so he lays out the mundane facts in a succinct, orderly manner and moves on to the more interesting bits.
Chapters are short and evenly spaced, each focusing on one small part of Clojure, starting off with the basics of arithmetic, variables, data types, logic, functions, and namespaces. Each chapter has sections at the end for discussing how to stay out of trouble when using those language features and what those features look like in actual Clojure programs. After the basics he covers the more intermediate topics of sequences, destructuring, records, tests, and specs before finishing things up with inter-operating with Java, working with threads, promises, futures, and state, and exploring the power of macros. It's a logical order that flows nicely, with later chapters building on earlier material through a gentle learning curve. I never felt stuck or frustrated, and I could read through a few chapters in a sitting at a rapid pace. That's testament to excellent technical writing skills that allow an experienced reader to go through the book at speed.
One fascinating thing about this book, and I imagine every Clojure book, is how little time is spent explaining syntax. Clojure is a Lisp-style language, so syntax is kept to a minimum. What do I mean by that? Well, the basic syntax of Clojure is a function call, followed by its arguments, both wrapped in parentheses like so:
(println "Hello, World!")
Vectors are denoted with [] and maps follow the form of {:key1 value1 :key2 value2}. Nearly all of the code looks like this, just with more complicated nesting of functions. After learning the standard library functions, you know and understand about 90% of the language! The more advanced language features like promises and macros add some more syntactical sugar, but really, compared to C-style languages, Clojure's syntax is incredibly lightweight. Some programmers may hate all of the parentheses, and the prefix arithmetic notation takes some getting used to, but learning a language that's so consistent in its structure is enlightening.
Not only does Clojure have the elegance of a Lisp, but it also runs on the JVM so we have access to all of the Java libraries that have been built up over the last few decades. That may not always seem like a benefit, considering how convoluted some Java libraries are, but Clojure has its own great features that should take precedence over the uglier parts of Java while still being able to leverage all of the time-saving work that's been done already.
Plus, Clojure has made significant advances in modern concurrent programming, both through its inherent nature as a functional language with immutable data structures, and because of safe concurrent programming structures like promises and futures. As Olsen says about threads, "One of the things that makes programming such a challenge is that many of our sharpest tools are also our most dangerous weapons." If concurrency is anything, it's hard, but Clojure makes this increasingly important programming paradigm easier and safer, as long as you know how to use those sharp tools.
Olsen has done a great job of teaching the set of tools available in Clojure with this book, and beyond it being clear and well written, it was a fun read all the way through. I love learning new languages and the new programming tools that they reveal, especially when I can find a great field guide like this one to help me along the way. If you don't know Clojure and would like to learn, Getting Clojure is a highly recommended read.
Spending time on the basics is fine, of course. It just wasn't what I was expecting. The book is split into seven chapters that cover a quick introduction of what Elixir looks like, variables and functions, pattern matching and control flow, recursion, higher-order functions (like each, map, and filter), an extended example text game, and impure functions. Notably missing from this list is anything having to do with concurrency and parallelism—Elixir's primary claim to fame, being that it runs on the Erlang VM. But this is a beginner's book, after all, and it keeps things pretty simple, although the pace is probably too fast and the explanations too short for someone who has never programmed before. This book is definitely meant for experienced programmers looking to get started with Elixir quickly.
In that respect, the book accomplishes its goal quite well. It presents all of the basic features of Elixir in a logical and succinct manner, covering all of the different syntax elements of the language without much ceremony. Elixir has its fair share of syntax, too, much more so than Clojure does. Whereas Clojure consists entirely of function calls, Elixir syntax is much more exotic:
The brief explanations of all of these language features tended to be a bit wanting. They were so clipped and simple that I was often left wondering if there wasn't much more to some of the features that I was missing. The writing style was abrupt and disjointed to the point of being robotic. Here is one example when discussing recursion:
Most of the code examples were forgettable as well. They did an adequate job of showing off the language features that they were meant to showcase, but they certainly didn't serve to inspire in any way. On the other hand, chapter 6 on the extended example of a text game was quite delightful. This chapter made up for most of those other faults, and made the book almost worthwhile.
In the example game, you code up a simple text-based dungeon crawler where you can pick a hero and move through a dungeon fighting monsters. It's an incredibly stripped down game, since it's developed in only about 35 pages, but it shows Elixir in a real application setting, using all of the language features that were introduced in the rest of the book. It was fun and illuminating, and I wish the rest of the book could have been done in the same way, explaining all of the Elixir syntax through one long code example.
Alas, it was not done that way, but even though the rest of the book was terse and didn't cover some of Elixir's more advanced features, it was still a decent read. It was short and to the point, making it useful for a programmer new to Elixir that needs to get going with the language right now. For anyone looking to learn Elixir more thoroughly, and maybe more enjoyably, you'll want to look somewhere else.
Of the two books, clearly Getting Clojure wins out over Learn Functional Programming With Elixir. Olsen showed once again how to write a programming book well, while the Elixir book was mechanical and insufficient. That's great if you're in the mood to learn Clojure, but what about Elixir? It's a fascinating language, but I'll have to look further to find a good book for learning the details.
VS. |
Getting Clojure
I remember thoroughly enjoying Russ Olsen's Eloquent Ruby years ago, so my expectations were already set for this book. Olsen did not disappoint. While Getting Clojure is an introductory programming language book instead of a guide on the idioms and best practices of the language, like Eloquent Ruby was, he brings the same clear, concise writing, and nails the right balance between covering the minutia and sketching an overall picture of Clojure without boring the reader to tears.Programming books that aim to teach a language from front to back can easily fall into the trap of spending too much time on all of the gory details about the language's arithmetic and logic systems or every possible control structure. Maybe it's because Clojure is a simple and straightforward language that doesn't have the complications that other languages have in these areas, but this book was a very easy read through these normally tedious parts. Olsen assumes the reader is already a programmer with a couple languages under their belt, so he lays out the mundane facts in a succinct, orderly manner and moves on to the more interesting bits.
Chapters are short and evenly spaced, each focusing on one small part of Clojure, starting off with the basics of arithmetic, variables, data types, logic, functions, and namespaces. Each chapter has sections at the end for discussing how to stay out of trouble when using those language features and what those features look like in actual Clojure programs. After the basics he covers the more intermediate topics of sequences, destructuring, records, tests, and specs before finishing things up with inter-operating with Java, working with threads, promises, futures, and state, and exploring the power of macros. It's a logical order that flows nicely, with later chapters building on earlier material through a gentle learning curve. I never felt stuck or frustrated, and I could read through a few chapters in a sitting at a rapid pace. That's testament to excellent technical writing skills that allow an experienced reader to go through the book at speed.
One fascinating thing about this book, and I imagine every Clojure book, is how little time is spent explaining syntax. Clojure is a Lisp-style language, so syntax is kept to a minimum. What do I mean by that? Well, the basic syntax of Clojure is a function call, followed by its arguments, both wrapped in parentheses like so:
(println "Hello, World!")
Vectors are denoted with [] and maps follow the form of {:key1 value1 :key2 value2}. Nearly all of the code looks like this, just with more complicated nesting of functions. After learning the standard library functions, you know and understand about 90% of the language! The more advanced language features like promises and macros add some more syntactical sugar, but really, compared to C-style languages, Clojure's syntax is incredibly lightweight. Some programmers may hate all of the parentheses, and the prefix arithmetic notation takes some getting used to, but learning a language that's so consistent in its structure is enlightening.
Not only does Clojure have the elegance of a Lisp, but it also runs on the JVM so we have access to all of the Java libraries that have been built up over the last few decades. That may not always seem like a benefit, considering how convoluted some Java libraries are, but Clojure has its own great features that should take precedence over the uglier parts of Java while still being able to leverage all of the time-saving work that's been done already.
Plus, Clojure has made significant advances in modern concurrent programming, both through its inherent nature as a functional language with immutable data structures, and because of safe concurrent programming structures like promises and futures. As Olsen says about threads, "One of the things that makes programming such a challenge is that many of our sharpest tools are also our most dangerous weapons." If concurrency is anything, it's hard, but Clojure makes this increasingly important programming paradigm easier and safer, as long as you know how to use those sharp tools.
Olsen has done a great job of teaching the set of tools available in Clojure with this book, and beyond it being clear and well written, it was a fun read all the way through. I love learning new languages and the new programming tools that they reveal, especially when I can find a great field guide like this one to help me along the way. If you don't know Clojure and would like to learn, Getting Clojure is a highly recommended read.
Learn Functional Programming with Elixir
Like Clojure, I wanted to dig more deeply into Elixir after reading about it in Seven More Languages in Seven Weeks. This book showed some promise as a quick introduction to the language that would focus on the functional programming paradigm. I think the title is a bit of a misnomer, though, because it was more on the side of a quick introduction to Elixir, which just happens to be a functional language. Almeida did not go into too much detail about how to use the functional paradigm to greatest advantage, and instead stuck to the basics.Spending time on the basics is fine, of course. It just wasn't what I was expecting. The book is split into seven chapters that cover a quick introduction of what Elixir looks like, variables and functions, pattern matching and control flow, recursion, higher-order functions (like each, map, and filter), an extended example text game, and impure functions. Notably missing from this list is anything having to do with concurrency and parallelism—Elixir's primary claim to fame, being that it runs on the Erlang VM. But this is a beginner's book, after all, and it keeps things pretty simple, although the pace is probably too fast and the explanations too short for someone who has never programmed before. This book is definitely meant for experienced programmers looking to get started with Elixir quickly.
In that respect, the book accomplishes its goal quite well. It presents all of the basic features of Elixir in a logical and succinct manner, covering all of the different syntax elements of the language without much ceremony. Elixir has its fair share of syntax, too, much more so than Clojure does. Whereas Clojure consists entirely of function calls, Elixir syntax is much more exotic:
max = fn
x1, x2 when x1 >= x2 -> x1
_, x2 -> x2
end
This is a simple function that returns the maximum of two numbers, but it shows some of the more extensive syntax of Elixir with pattern matching on the second and third lines, the when guard clause, the underscore used as a wildcard matcher, and the anonymous function declaration. When this function is called, if line 2 matches, including the guard clause such that x1 >= x2, then x1 is returned. Otherwise, line 3 will match automatically and x2 is returned. This is just a sampling of syntax, too. Things get even more involved with lists and maps and function arguments, all mixed in with pattern matching and pipes. This is a rich language, indeed.The brief explanations of all of these language features tended to be a bit wanting. They were so clipped and simple that I was often left wondering if there wasn't much more to some of the features that I was missing. The writing style was abrupt and disjointed to the point of being robotic. Here is one example when discussing recursion:
Code must be expressive to be easier to maintain. Recursion with anonymous functions isn't straightforward, but it is possible. In Elixir, we can use the capturing feature to use named function references like anonymous functions:Here's another example when describing the Enum module:
The Enum functions work like our homemade functions. The Enum module has many useful functions; it's easy to guess what they do from their names. Let's take a quick look:This kind of writing just starts to grate on me because it has no natural flow to it. I would end up skimming over much of the explanations to try to pick out the relevant bits without feeling like I might be assimilated by the Borg.
Most of the code examples were forgettable as well. They did an adequate job of showing off the language features that they were meant to showcase, but they certainly didn't serve to inspire in any way. On the other hand, chapter 6 on the extended example of a text game was quite delightful. This chapter made up for most of those other faults, and made the book almost worthwhile.
In the example game, you code up a simple text-based dungeon crawler where you can pick a hero and move through a dungeon fighting monsters. It's an incredibly stripped down game, since it's developed in only about 35 pages, but it shows Elixir in a real application setting, using all of the language features that were introduced in the rest of the book. It was fun and illuminating, and I wish the rest of the book could have been done in the same way, explaining all of the Elixir syntax through one long code example.
Alas, it was not done that way, but even though the rest of the book was terse and didn't cover some of Elixir's more advanced features, it was still a decent read. It was short and to the point, making it useful for a programmer new to Elixir that needs to get going with the language right now. For anyone looking to learn Elixir more thoroughly, and maybe more enjoyably, you'll want to look somewhere else.
Of the two books, clearly Getting Clojure wins out over Learn Functional Programming With Elixir. Olsen showed once again how to write a programming book well, while the Elixir book was mechanical and insufficient. That's great if you're in the mood to learn Clojure, but what about Elixir? It's a fascinating language, but I'll have to look further to find a good book for learning the details.
segunda-feira, 23 de março de 2020
sexta-feira, 20 de março de 2020
Suikoden (PSX)
Developer: | Konami | | | Release Date: | 1997 (1995 in Japan) | | | Systems: | PlayStation, Saturn, Windows |
This week on Super Adventures, I'm finally getting around to Suikoden, a game that's been sitting on my shelf for ages. I borrowed it from a friend a while ago and he moved away before I could give it back, so it's just been lying there ever since, unplayed. Until today!
I knew the game was an JRPG when I borrowed it (one of the earliest RPGs on the PlayStation in fact), but I had no idea what the title was about. Typically Japanese games will get an English title when they're released in the West (except for games like Final Fantasy and Dragon Quest which had an English title from the start), but for some reason this has remained Suikoden.
Turns out that it's loosely based on a novel of the same name. Well, that's the name it has in Japan anyway. It's actually a Chinese novel called Shui Hu Zhuan, one of the four great classic novels of Chinese literature (along with Romance of the Three Kingdoms, Journey to the West and Dream of the Red Chamber), and in English the title translates to... Water Margin. Probably for the best they left it as Suikoden.
Read on »
quinta-feira, 19 de março de 2020
Suikoden (PSX)
Developer: | Konami | | | Release Date: | 1997 (1995 in Japan) | | | Systems: | PlayStation, Saturn, Windows |
This week on Super Adventures, I'm finally getting around to Suikoden, a game that's been sitting on my shelf for ages. I borrowed it from a friend a while ago and he moved away before I could give it back, so it's just been lying there ever since, unplayed. Until today!
I knew the game was an JRPG when I borrowed it (one of the earliest RPGs on the PlayStation in fact), but I had no idea what the title was about. Typically Japanese games will get an English title when they're released in the West (except for games like Final Fantasy and Dragon Quest which had an English title from the start), but for some reason this has remained Suikoden.
Turns out that it's loosely based on a novel of the same name. Well, that's the name it has in Japan anyway. It's actually a Chinese novel called Shui Hu Zhuan, one of the four great classic novels of Chinese literature (along with Romance of the Three Kingdoms, Journey to the West and Dream of the Red Chamber), and in English the title translates to... Water Margin. Probably for the best they left it as Suikoden.
Read on »
Tech Book Face Off: Data Smart Vs. Python Machine Learning
After reading a few books on data science and a little bit about machine learning, I felt it was time to round out my studies in these subjects with a couple more books. I was hoping to get some more exposure to implementing different machine learning algorithms as well as diving deeper into how to effectively use the different Python tools for machine learning, and these two books seemed to fit the bill. The first book with the upside-down face, Data Smart: Using Data Science to Transform Data Into Insight by John W. Foreman, looked like it would fulfill the former goal and do it all in Excel, oddly enough. The second book with the right side-up face, Python Machine Learning: Machine Learning and Deep Learning with Python, scikit-learn, and TensorFlow by Sebastian Raschka and Vahid Mirjalili, promised to address the second goal. Let's see how these two books complement each other and move the reader toward a better understanding of machine learning.
It was refreshing to read a book about data science that didn't take itself seriously and added a bit of levity to an otherwise dry (interesting, but dry) subject. Even though it was lighthearted, the book was not a joke. It had an intensity to the material that was surprising given the medium through which it was presented. Spreadsheets turned out to be a great way to show how these algorithms are built up, and you can look through the columns and rows to see how each step of each calculation is performed. Conditional formatting helps guide understanding by highlighting outliers and important contrasts in the rows of data. Excel may not be the best choice for crunching hundreds of thousands of entries in an industrial-scale model, but for learning how those models actually work, I'm convinced that it was a worthy choice.
The book starts out with a little introduction that describes what you got yourself into and justifies the choice of Excel for those of us that were a bit leery. The first chapter gives a quick tour of the important parts of Excel that are going to be used throughout the book—a skim-worthy chapter. The first real chapter jumps into explaining how to build up a k-means cluster model for the highly critical task of grouping people on a middle school dance floor. Like most of the rest of the chapters, this one starts out easy, but ramps up the difficulty so that by the end we're clustering subscribers for email marketing with a dozen or so dimensions to the data.
Chapter 3 switches gears from an unsupervised to a supervised learning model with naïve Bayes for classifying tweets about Mandrill the product vs. the animal vs. the Mega Man X character. Here we can see how irreverent, but on-point Foreman is with his explanations:
After optimization came another dive into cluster analysis, but this time using network graphs to analyze wholesale wine purchasing data. This model was new to me, and a fascinating way to use graphs to figure out closely related nodes. The next chapter moved on to regression, both linear and non-linear varieties, and this happens to be the Target-pregnancy example. It was super interesting to see how to conform the purchasing data to a linear model and then run the regression on it to analyze the data. Foreman also had some good advice tucked away in this chapter on data vs. models:
The next chapter was on detecting outliers. In this case, the outliers were exceptionally good or exceptionally bad call center employees even though the bad employees didn't fall below any individual firing thresholds on their performance ratings. It was another excellent example to cap off a whole series of very well thought out and well executed examples. There was one more chapter on how to do some of these models in R, but I skipped it. I'm not interested in R, since I would just use Python, and this chapter seemed out of place with all the spreadsheet work in the rest of the book.
What else can I say? This book was awesome. Every example of every model was deep, involved, and appropriate for learning the ins and outs of that particular model. The writing was funny and engaging, and it was clear that Foreman put a ton of thought and energy into this book. I highly recommend it to anyone wanting to learn the inner workings of some of the standard data science models.
As long as you're comfortable with linear algebraic notation, this book is a straightforward read. It's not exactly easy, but it never takes off into the stratosphere with the difficulty level. The authors also assume you already know Python, so they don't waste any time on the language, instead packing the book completely full of machine learning stuff. The shorter first chapter still does the introductory tour of what machine learning is and how to install the correct Python environment and libraries that will be used in the rest of the book. The next chapter kicks us off with our first algorithm, showing how to implement a perceptron classifier as a mathematical model, as Python code, and then using scikit-learn. This basic sequence is followed for most of the algorithms in the book, and it works well to smooth out the reader's understanding of each one. Model performance characteristics, training insights, and decisions about when to use the model are highlighted throughout the chapter.
Chapter 3 delves deeper into perceptrons by looking at different decision functions that can be used for the output of the perceptron model, and how they could be used for more things beyond just labeling each input with a specific class as described here:
The next chapter switches gears and looks at how to generate good training sets with data preprocessing, and how to train a model effectively without overfitting using regularization. Regularization is a way to systematically penalize the model for assigning large weights that would lead to memorizing the training data during training. Another way to avoid overfitting is to use ensemble learning with a model like random forests, which are introduced in this chapter as well. The following chapter looks at how to do dimensionality reduction, both unsupervised with principal component analysis (PCA) and supervised with linear discriminant analysis (LDA).
Chapter 6 comes back to how to train your dragon…I mean model…by tuning the hyperparameters of the model. The hyperparameters are just the settings of the model, like what its decision function is or how fast its learning rate is. It's important during this tuning that you don't pick hyperparameters that are just best at identifying the test set, as the authors explain:
Chapter 10 covers regression analysis in more depth with single and multiple linear and nonlinear regression. Some of this stuff has been seen in previous chapters, and indeed, the cross-referencing starts to get a bit annoying at this point. Every single time a topic comes up that's covered somewhere else, it gets a reference with the full section name attached. I'm not sure how I feel about this in general. It's nice to be reminded of things that you've read about hundreds of pages back and I've read books that are more confusing for not having done enough of this linking, but it does get tedious when the immediately preceding sections are referenced repeatedly. The next chapter is similar with a deeper look at unsupervised clustering algorithms. The new k-means algorithm is introduced, but it's compared against algorithms covered in chapter 3. This chapter also covers how we can decide if the number of clusters chosen is appropriate for the data, something that's not so easy for high-dimensional data.
Now that we're two-thirds of the way through the book, we come to the elephant in the machine learning room, the multilayer artificial neural network. These networks are built up from perceptrons with various activation functions:
The last two chapters look at two more types of neural networks: the deep convolutional neural network (CNN) and the recurrent neural network (RNN). The CNN does the same hand-written digit classification as before, but of course does it better. The RNN is a network that's used for sequential and time-series data, and in this case, it was used in two examples. The first example was another implementation of the sentiment analyzer for IMDb movie reviews, and it ended up performing similarly to the regression classifier that we used back in chapter 8. The second example was for how to train an RNN with Shakespeare's Hamlet to generate similar text. It sounds cool, but frankly, it was pretty disappointing for the last example of the most complicated network in a machine learning book. It generated mostly garbage and was just a let-down at the end of the book.
Even though this book had a few issues, like tedious code duplication and explanations in places, the annoying cross-referencing, and the out-of-place chapter 9, it was a solid book on machine learning. I got a ton out of going through the implementations of each of the machine learning algorithms, and wherever the topics started to stray into more in-depth material, the authors provided references to the papers and textbooks that contained the necessary details. Python Machine Learning is a solid introductory text on the fundamental machine learning algorithms, both in how they work mathematically how they're implemented in Python, and how to use them with scikit-learn and TensorFlow.
Of these two books, Data Smart is a definite-read if you're at all interested in data science. It does a great job of showing how the basic data analysis algorithms work using the surprisingly effect method of laying out all of the calculations in spreadsheets, and doing it with good humor. Python Machine Learning is also worth a look if you want to delve into machine learning models, see how they would be implemented in Python, and learn how to use those same models effectively with scikit-learn and TensorFlow. It may not be the best book on the topic, but it's a solid entry and covers quite a lot of material thoroughly. I was happy with how it rounded out my knowledge of machine learning.
VS. |
Data Smart
I must admit; I was somewhat hesitant to get this book. I was worried that presenting everything in Excel would be a bit too simple to really learn much about data science, but I needn't have been concerned. This book was an excellent read for multiple reasons, not least of which is that Foreman is a highly entertaining writer. His witty quips about everything from middle school dances to Target predicting teen pregnancies were a great motivator to keep me reading along, and more than once I caught myself chuckling out loud at an unexpectedly absurd reference.It was refreshing to read a book about data science that didn't take itself seriously and added a bit of levity to an otherwise dry (interesting, but dry) subject. Even though it was lighthearted, the book was not a joke. It had an intensity to the material that was surprising given the medium through which it was presented. Spreadsheets turned out to be a great way to show how these algorithms are built up, and you can look through the columns and rows to see how each step of each calculation is performed. Conditional formatting helps guide understanding by highlighting outliers and important contrasts in the rows of data. Excel may not be the best choice for crunching hundreds of thousands of entries in an industrial-scale model, but for learning how those models actually work, I'm convinced that it was a worthy choice.
The book starts out with a little introduction that describes what you got yourself into and justifies the choice of Excel for those of us that were a bit leery. The first chapter gives a quick tour of the important parts of Excel that are going to be used throughout the book—a skim-worthy chapter. The first real chapter jumps into explaining how to build up a k-means cluster model for the highly critical task of grouping people on a middle school dance floor. Like most of the rest of the chapters, this one starts out easy, but ramps up the difficulty so that by the end we're clustering subscribers for email marketing with a dozen or so dimensions to the data.
Chapter 3 switches gears from an unsupervised to a supervised learning model with naïve Bayes for classifying tweets about Mandrill the product vs. the animal vs. the Mega Man X character. Here we can see how irreverent, but on-point Foreman is with his explanations:
Because naïve Bayes is often called "idiot's Bayes." As you'll see, you get to make lots of sloppy, idiotic assumptions about your data, and it still works! It's like the splatter-paint of AI models, and because it's so simple and easy to implement (it can be done in 50 lines of code), companies use it all the time for simple classification jobs.Every chapter is like this and better. You never know what Foreman's going to say next, but you quickly expect it to be entertaining. Case in point, the next chapter is on optimization modeling using an example of, what else, commercial-scale orange juice mixing. It's just wild; you can't make this stuff up. Well, Foreman can make it up, it seems. The examples weren't just whimsical and funny, they were solid examples that built up throughout the chapter to show multiple levels of complexity for each model. I was constantly impressed with the instructional value of these examples, and how working through them really helped in understanding what to look for to improve the model and how to make it work.
After optimization came another dive into cluster analysis, but this time using network graphs to analyze wholesale wine purchasing data. This model was new to me, and a fascinating way to use graphs to figure out closely related nodes. The next chapter moved on to regression, both linear and non-linear varieties, and this happens to be the Target-pregnancy example. It was super interesting to see how to conform the purchasing data to a linear model and then run the regression on it to analyze the data. Foreman also had some good advice tucked away in this chapter on data vs. models:
You get more bang for your buck spending your time on selecting good data and features than models. For example, in the problem I outlined in this chapter, you'd be better served testing out possible new features like "customer ceased to buy lunch meat for fear of listeriosis" and making sure your training data was perfect than you would be testing out a neural net on your old training data.We're into chapter 7 now with ensemble models. This technique takes a bunch of simple, crappy models and improves their performance by putting them to a vote. The same pregnancy data was used from the last chapter, but with this different modeling approach, it's a new example. The next chapter introduces forecasting models by attempting to forecast sales for a new business in sword-smithing. This example was exceptionally good at showing the build-up from a simple exponential smoothing model to a trend-corrected model and then to a seasonally-corrected cyclic model all for forecasting sword sales.
Why? Because the phrase "garbage in, garbage out" has never been more applicable to any field than AI. No AI model is a miracle worker; it can't take terrible data and magically know how to use that data. So do your AI model a favor and give it the best and most creative features you can find.
As I've learned in the other data science books, so much of data analysis is about cleaning and munging the data. Running the model(s) doesn't take much time at all.
The next chapter was on detecting outliers. In this case, the outliers were exceptionally good or exceptionally bad call center employees even though the bad employees didn't fall below any individual firing thresholds on their performance ratings. It was another excellent example to cap off a whole series of very well thought out and well executed examples. There was one more chapter on how to do some of these models in R, but I skipped it. I'm not interested in R, since I would just use Python, and this chapter seemed out of place with all the spreadsheet work in the rest of the book.
What else can I say? This book was awesome. Every example of every model was deep, involved, and appropriate for learning the ins and outs of that particular model. The writing was funny and engaging, and it was clear that Foreman put a ton of thought and energy into this book. I highly recommend it to anyone wanting to learn the inner workings of some of the standard data science models.
Python Machine Learning
This is a fairly long book, certainly longer than most books I've read recently, and a pretty thorough and detailed introduction to machine learning with Python. It's a melding of a couple other good books I've read, containing quite a few machine learning algorithms that are built up from scratch in Python a la Data Science from Scratch, and showing how to use the same algorithms with scikit-learn and TensorFlow a la the Python Data Science Handbook. The text is methodical and deliberate, describing each algorithm clearly and carefully, and giving precise explanations for how each algorithm is designed and what their trade-offs and shortcomings are.As long as you're comfortable with linear algebraic notation, this book is a straightforward read. It's not exactly easy, but it never takes off into the stratosphere with the difficulty level. The authors also assume you already know Python, so they don't waste any time on the language, instead packing the book completely full of machine learning stuff. The shorter first chapter still does the introductory tour of what machine learning is and how to install the correct Python environment and libraries that will be used in the rest of the book. The next chapter kicks us off with our first algorithm, showing how to implement a perceptron classifier as a mathematical model, as Python code, and then using scikit-learn. This basic sequence is followed for most of the algorithms in the book, and it works well to smooth out the reader's understanding of each one. Model performance characteristics, training insights, and decisions about when to use the model are highlighted throughout the chapter.
Chapter 3 delves deeper into perceptrons by looking at different decision functions that can be used for the output of the perceptron model, and how they could be used for more things beyond just labeling each input with a specific class as described here:
In fact, there are many applications where we are not only interested in the predicted class labels, but where the estimation of the class-membership probability is particularly useful (the output of the sigmoid function prior to applying the threshold function). Logistic regression is used in weather forecasting, for example, not only to predict if it will rain on a particular day but also to report the chance of rain. Similarly, logistic regression can be used to predict the chance that a patient has a particular disease given certain symptoms, which is why logistic regression enjoys great popularity in the field of medicine.The sigmoid function is a fundamental tool in machine learning, and it comes up again and again in the book. Midway through the chapter, they introduce three new algorithms: support vector machines (SVM), decision trees, and K-nearest neighbors. This is the first chapter where we see an odd organization of topics. It seems like the first part of the chapter really belonged with chapter 2, but including it here instead probably balanced chapter length better. Chapter length was quite even throughout the book, and there were several cases like this where topics were spliced and diced between chapters. It didn't hurt the flow much on a complete read-through, but it would likely make going back and finding things more difficult.
The next chapter switches gears and looks at how to generate good training sets with data preprocessing, and how to train a model effectively without overfitting using regularization. Regularization is a way to systematically penalize the model for assigning large weights that would lead to memorizing the training data during training. Another way to avoid overfitting is to use ensemble learning with a model like random forests, which are introduced in this chapter as well. The following chapter looks at how to do dimensionality reduction, both unsupervised with principal component analysis (PCA) and supervised with linear discriminant analysis (LDA).
Chapter 6 comes back to how to train your dragon…I mean model…by tuning the hyperparameters of the model. The hyperparameters are just the settings of the model, like what its decision function is or how fast its learning rate is. It's important during this tuning that you don't pick hyperparameters that are just best at identifying the test set, as the authors explain:
A better way of using the holdout method for model selection is to separate the data into three parts: a training set, a validation set, and a test set. The training set is used to fit the different models, and the performance on the validation set is then used for the model selection. The advantage of having a test set that the model hasn't seen before during the training and model selection steps is that we can obtain a less biased estimate of its ability to generalize to new data.It seems odd that a separate test set isn't enough, but it's true. Training a machine isn't as simple as it looks. Anyway, the next chapter circles back to ensemble learning with a more detailed look at bagging and boosting. (Machine learning has such creative names for things, doesn't it?) I'll leave the explanations to the book and get on with the review, so the next chapter works through an extended example application to do sentiment analysis of IMDb movie reviews. It's kind of a neat trick, and it uses everything we've learned so far together in one model instead of piecemeal with little stub examples. Chapter 9 continues the example with a little web application for submitting new reviews to the model we trained in the previous chapter. The trained model will predict whether the submitted review is positive or negative. This chapter felt a bit out of place, but it was fine for showing how to use a model in a (semi-)real application.
Chapter 10 covers regression analysis in more depth with single and multiple linear and nonlinear regression. Some of this stuff has been seen in previous chapters, and indeed, the cross-referencing starts to get a bit annoying at this point. Every single time a topic comes up that's covered somewhere else, it gets a reference with the full section name attached. I'm not sure how I feel about this in general. It's nice to be reminded of things that you've read about hundreds of pages back and I've read books that are more confusing for not having done enough of this linking, but it does get tedious when the immediately preceding sections are referenced repeatedly. The next chapter is similar with a deeper look at unsupervised clustering algorithms. The new k-means algorithm is introduced, but it's compared against algorithms covered in chapter 3. This chapter also covers how we can decide if the number of clusters chosen is appropriate for the data, something that's not so easy for high-dimensional data.
Now that we're two-thirds of the way through the book, we come to the elephant in the machine learning room, the multilayer artificial neural network. These networks are built up from perceptrons with various activation functions:
However, logistic activation functions can be problematic if we have highly negative input since the output of the sigmoid function would be close to zero in this case. If the sigmoid function returns output that are close to zero, the neural network would learn very slowly and it becomes more likely that it gets trapped in the local minima during training. This is why people often prefer a hyperbolic tangent as an activation function in hidden layers.And they're trained with various types of back-propagation. Chapter 12 shows how to implement neural networks from scratch, and chapter 13 shows how to do it with TensorFlow, where the network can end up running on the graphics card supercomputer inside your PC. Since TensorFlow is a complex beast, chapter 14 gets into the nitty gritty details of what all the pieces of code do for implementation of the handwritten digit identifier we saw in the last chapter. This is all very cool stuff, and after learning a bit about how to do the CUDA programming that's behind this library with CUDA by Example, I have a decent appreciation for what Google has done with making it as flexible, performant, and user-friendly as they can. It's not simple by any means, but it's as complex as it needs to be. Probably.
The last two chapters look at two more types of neural networks: the deep convolutional neural network (CNN) and the recurrent neural network (RNN). The CNN does the same hand-written digit classification as before, but of course does it better. The RNN is a network that's used for sequential and time-series data, and in this case, it was used in two examples. The first example was another implementation of the sentiment analyzer for IMDb movie reviews, and it ended up performing similarly to the regression classifier that we used back in chapter 8. The second example was for how to train an RNN with Shakespeare's Hamlet to generate similar text. It sounds cool, but frankly, it was pretty disappointing for the last example of the most complicated network in a machine learning book. It generated mostly garbage and was just a let-down at the end of the book.
Even though this book had a few issues, like tedious code duplication and explanations in places, the annoying cross-referencing, and the out-of-place chapter 9, it was a solid book on machine learning. I got a ton out of going through the implementations of each of the machine learning algorithms, and wherever the topics started to stray into more in-depth material, the authors provided references to the papers and textbooks that contained the necessary details. Python Machine Learning is a solid introductory text on the fundamental machine learning algorithms, both in how they work mathematically how they're implemented in Python, and how to use them with scikit-learn and TensorFlow.
Of these two books, Data Smart is a definite-read if you're at all interested in data science. It does a great job of showing how the basic data analysis algorithms work using the surprisingly effect method of laying out all of the calculations in spreadsheets, and doing it with good humor. Python Machine Learning is also worth a look if you want to delve into machine learning models, see how they would be implemented in Python, and learn how to use those same models effectively with scikit-learn and TensorFlow. It may not be the best book on the topic, but it's a solid entry and covers quite a lot of material thoroughly. I was happy with how it rounded out my knowledge of machine learning.
Suzy Cube Update: April 6, 2018
#SuzyCube #gamedev #indiedev #madewithunity @NoodlecakeGames
Sorry for the late update, everyone! Hope you all had a good holiday weekend and a funny April Fool's day!
Read more »Louard's game design sounding board and home of the Pro's and Con's reviews.
segunda-feira, 16 de março de 2020
Cold Wars 2019
Some shots from the Warmaster Revolution and Epic Armageddon tournaments from this past weekend at Cold Wars.
Assinar:
Postagens (Atom)