Tag Info

67

I want to reframe your question. Don't think about switching, think about adding. In data science you'll be able to go very far with either python or r but you'll go farthest with both. Python and r integrate very well, thanks to the reticulate package. I often tidy data in r because it is easier for me, train a model in python to benefit from superior ...

44

Python comes with a huge amount of inbuilt libraries. Many of the libraries are for Artificial Intelligence and Machine Learning. Some of the libraries are TensorFlow (which is a high-level neural network library), scikit-learn (for data mining, data analysis and machine learning), pylearn2 (more flexible than scikit-learn), etc. The list keeps going and ...

32

Of course, this type of questions will also lead to primarily opinion-based answers. Nonetheless, it is possible to enumerate the strengths and weakness of each language, with respect to machine learning, statistics, and data analysis tasks, which I will try to list below. R Strengths R was designed and developed for statisticians and data analysts, so it ...

31

Practically all of the most popular and widely used deep-learning frameworks are implemented in Python on the surface and C/C++ under the hood. I think the main reason is that Python is widely used in scientific and research communities, because it's easy to experiment with new ideas and code prototypes quickly in a language with minimal syntax like Python. ...

30

You don't need a powerful language for programming AI. Most of the developers are using libraries like Keras, Torch, Caffe, Watson, TensorFlow, etc. Those low level libraries are highly optimized and handle all the tough work. They are built with high-performance languages, like C, C++. Python is just there for high level task like describing the neural ...

14

C++ is actually one of the most popular languages used in the AI/ML space. Python may be more popular in general, but as others have noted, it's actually quite common to have hybrid systems where the CPU intensive number-crunching is done in C++ and Python is used for higher level functions. Just to illustrate: http://mloss.org/software/language/c__/ http:...

9

What attracts me to Python for my analysis work is the "full-stack" of tools that are available by virtue of being designed as a general purpose language vs. R as a domain specific language. The actual data analysis is only part of the story, and Python has rich tools and a clean full-featured language to get from the beginning to the end in a single ...

8

Python has a standard library in development, and a few for AI. It has an intuitive syntax, basic control flow, and data structures. It also supports interpretive run-time, without standard compiler languages. This makes Python especially useful for prototyping algorithms for AI.

6

I didn't have this choice because I was forced to move from R to Python: It depends on your environment: When you are embedded in an engineer department, working technical group or something similar than Python is more feasible. When you are surrounded by scientists and especially statisticians, stay with R. PS: R offers keras and tensorflow as well ...

5

Firstly, before we commence I recommend that you refer to similar questions on the network such as https://datascience.stackexchange.com/questions/25053/best-practical-algorithm-for-sentence-similarity and https://stackoverflow.com/questions/62328/is-there-an-algorithm-that-tells-the-semantic-similarity-of-two-phrases To determine the similarity of ...

5

Blackjack is usually modelled using Monte Carlo (MC) Methods. There is a lot of literature on MC methods which is interesting on its own right but here is a paper describing how MC is applied to Blackjack. There is also a good description on page 110 of the Introduction to Reinforcement Learning. Good luck!

5

It depends how flexible it needs to be: if you have a fully-fledged system ready for production, which is not going to need much adjusting, then C++ (or even C) might be fine. You need to put a lot of time into building the software, but then it should run pretty fast. However, if you're still experimenting with settings and parameters, and maybe need to ...

5

The usual parameters to adjust in a k-means: Number of clusters (recall many clusters can have same label). Distance definition (euclidean is the most basic, Gauss is an improvement) Selection of initial cluster positions. Data preprocessing (data normalization, ...)

5

Genetic algorithms and Neural Networks both are "general" methods, in the sense that they are not "domain-specific", they do not rely specifically on any domain knowledge of the game of Mario. So yes, if they can be used to successfully learn how to play Mario, it is likely that they can also be applied with similar success to other Platformers (or even ...

5

Does it make sense? In general, yes it is interpretable, back propagation will work, and the NN can be optimised. By using ReLU, the default network has a minimum logit of $0$ for the softmax input, which means at least initially that there will be higher minimum probabilities associated with all classes (compared to allowing negative logits which would ...

4

Decision tree nodes are split bases on the number of data samples, these numbers indicate the number of data samples they are fit to. In your case samples = 256. It is further split into two nodes of 154 and 102.

4

The best approach at this time (2019): The most efficient approach now is to use Universal Sentence Encoder by Google (paper_2018) which computes semantic similarity between sentences using the dot product of their embeddings (i.e learned vectors of 215 values). Similarity is a float number between 0 (i.e no similarity) and 1 (i.e strong similarity). The ...

4

It's a mix of many factors that together make it a very good option to develop cognitive systems. Quick development Rapid prototyping Friendly syntax with almost human-level readability Diverse standard library and multi-paradigm It can be used as a frontend for performant backends written in compiled languages such as C/C++. Existing performant numerical ...

4

If you want to get experience, you should probably start with some easier task. Object detection and localization are relatively hard and writing a neural network and image processing pipeline from scratch will take you a long time. If you want to build up an intuition about how NN's work, you might want to code some simple task from scratch. This is an ...

4

What aspects of AI would be most applicable to creating a self learning game AI for a racing game (Q-Learning, NEAT etc) In general, you are looking at a problem that involves sequential decision making, in a machine learning context. If you are wanting to build an agent that can learn by receiving screen images, then NEAT cannot scale to that complexity ...

4

$TD(\lambda)$ return has the following form: $$G_t^\lambda = (1 - \lambda) \sum_{n=1}^{\infty} \lambda^{n-1} G_{t:t+n}$$ For you MDP $TD(1)$ looks like this: \begin{align} G &= 0.64 (r_0 + r_2 + r_4 + r_5 + r_6) + 0.36(r_1 + r_3 + r_4 + r_5 + r_6)\\ G &\approx 6.164 \end{align} $TD(\lambda)$ looks like this: \begin{...

4

I would say yes. Python is better than R for most tasks, but R has its niche and you would still want to use it in many circumstances. Additionally, learning a second language will improve your programming skills. My own perspective on the strengths of R vs Python is that I would prefer R for a small, single-purpose program involving tables or charts, or ...

4

The primary issue I see is that in the loop through time steps t in every training episode, you select actions for both players (who should have opposing goals to each other), but update a single q_table (which can only ever be correct for the "perspective" of one of your two players) on both of those actions, and updating both of them using a ...

3

That’s because python is a modern scripting object-oriented programming language that has stylish syntax. Contrary to structural programming languages like java and C++, its scripting nature enables the programmer to test his/her hypothesis very fast. Furthermore, there are lots of open source machine learning libraries (including scikit-learn and Keras) ...

3

Python has rich library, it is also object oriented, easy to program. It can be also used as frontend language. That's why it is used in artificial intelligence. Rather than AI it is also used in machine learning, soft computing, NLP programming and also used as web scripting or in Ethical hacking.

3

No, your second statement does not correctly implement the Q-learning update rule, which the first statement correctly implements.

3

I found the following detailed and well documented Python notebook, which uses only NumPy.

3

Your implementation of Monte Carlo Exploring Starts algorithm appears to be working as designed. This is a problem that can occur with some deterministic policies in the gridworld environment. It is possible for your policy improvement step to generate such a policy, and there is no recovery from this built into the algorithm. First visit and every visit ...

3

I think your code works fine for what is meant to be doing - fitting a linear regression model. The problem here is that you are using a linear model. Linear model does not have an adequate approximation capacity, it will only be able to fit data that is described by a linear function. Here, you gave a random sequence of numbers, that is very difficult for ...

3

Yes you can decay the learning rate in Q-learning, and yes this should result in more accurate Q-values in the long term for many environments. However, this is something that is harder to manage than in supervised learning, and might not be as useful or necessary. The issues you need to be concerned about are: Non-stationarity The target values in value-...

Only top voted, non community-wiki answers of a minimum length are eligible