There is an array of numbers, say [2,1,2,2,1,2,..2,1,1] , how to continue this array? What methods of machine learning are better suited?
1 answer
If the series consists of "1" and "2" and there is no additional information about the series, then the only thing that can be done is to look for the probability of each of the values appearing, and then using the obtained shares to generate random values.
You can go a little further, and try to identify the frequency of occurrence for couples, triads, quartets, etc.
If there is (or you can extract) some additional information, (well, for example, that the probabilities of the occurrence of "1" and "2" change over time, i.e. there is a trend or there is seasonality), then you can try to detect them (trend or seasonality) using appropriate methods.
If the appearance of "1" and "2" is due to some other factors, then you can try to build a classifier where the factors are independent variables, and your "1" and "2" are just a class label.
In any case, the main rule of Data Science is that data does not exist by itself. Meaningful data analysis can be carried out only having an idea of the semantic context of the available data. Good luck.
- oneThe last paragraph is straight to the point! +1 - MaxU
- My problem is that I do not know the data in advance. And you need to predict them blindly. - Dmitry Klemenkov
- one"In the blind" can only guess. And if you predict, then somehow you need to study the data. By the way - "in advance" know and not necessary. It is possible to study them as they become available, including the methods mentioned above. - passant
np.random.choice(np.arange(1, 9), N), whereNis the number of elements ...;) - MaxU