线性回归不优化非线性数据

时间:2018-03-27 05:38:20

标签: machine-learning linear-regression

我是ML的新手,正在尝试线性回归。我正在使用this数据集。数据和我的“优化”模型如下所示:

enter image description here

我正在修改这样的数据:

public abstract class Serializer {
    public static Serializer fromBytes(byte[] bytes) {
        ...
    }

    public byte[] toBytes() {
        ...
    }
}

public class Foo<T extends Serializer> {
    private T t;
    public Foo(T t) {
        this.t = t;
    }

    public void foo() {
        t.toBytes(); //this will polymorph into the correct call because it's called on the object instance and not the Serializer class
    }

    public void bar(byte[] bytes) {
        T.fromBytes(bytes); // I'd like to be able to override this method so I can use different implementations
    }
}

初始费用:0.8086672720475084

优化成本:0.7282965408177141

无论如何,我无法进一步优化。跑步 提高学习率会导致成本增加。

我的休息算法很好,因为我可以针对更简单的数据集进行优化。如下所示:

enter image description here

抱歉,如果这是基本的东西,但我似乎无法找到一种方法来优化原始数据的模型。

编辑:

请看我的代码,我不知道为什么它不起作用

X = np.vstack((np.ones((X.size)),X,X**2))
Y = np.log10 (Y)
#have tried roots of Y and 3 degree feature as well

我尝试再次调试但我找不到它。请帮助我。

0 个答案:

没有答案
相关问题