Machine learning 有没有一种方法可以使用机器学习对离散和无限规模的数据进行分类?

Machine learning 有没有一种方法可以使用机器学习对离散和无限规模的数据进行分类?,machine-learning,classification,discrete-mathematics,supervised-learning,Machine Learning,Classification,Discrete Mathematics,Supervised Learning,数据如下: x y 7773 0 9805 4 7145 0 7645 1 2529 1 4814 2 6027 2 7499 2 3367 1 8861 5 9776 2 8009 5 3844 2 1218 2 1120 1 4553 0 3017 1 2582 2 1691 2 5342 0 ... 实函数f(x)是:(返回十进制整数的圆计数) 训练数据和测试数据可以通过随机方式产生: data = [] target = [] for i in xrange(3000):

数据如下:

x    y
7773 0
9805 4
7145 0
7645 1
2529 1
4814 2
6027 2
7499 2
3367 1
8861 5
9776 2
8009 5
3844 2
1218 2
1120 1
4553 0
3017 1
2582 2
1691 2
5342 0
...
实函数f(x)是:(返回十进制整数的圆计数)

训练数据和测试数据可以通过随机方式产生:

data = []
target = []
for i in xrange(3000):
    x = random.randint(0, 999999) #hardcode a scale
    data.append([x])
    target.append(f(x))
实函数是离散的、无穷大的

有没有一种方法或模型可以对这些数据进行分类


我尝试了SVM(支持向量机),获得了20%的准确率。

看起来像是序列模型的典型用例。通过将数字视为输入网络的整数序列,可以轻松学习LSTM/其他递归神经网络。在这一点上,它只需要学习求和运算和一个简单的映射(f_映射)

data = []
target = []
for i in xrange(3000):
    x = random.randint(0, 999999) #hardcode a scale
    data.append([x])
    target.append(f(x))