可以使用线性回归来解决这个问题吗?

时间:2019-09-12 13:11:00

标签: python machine-learning linear-regression

我有一个看起来像这样的数据框:

bottomNavigationBar

基本上,我正在尝试预测那些零值。

bottomNavigationBar: Column(
    mainAxisSize: MainAxisSize.min,
    children: <Widget>[
        Divider(
            height: 0,
        ),
        Padding(
            padding: const EdgeInsets.all(8.0),
            child: FlatButton(
                child: Text('Button'),
                color: Theme.of(context).primaryColor,
                materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
                padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
                textColor: Theme.of(context).colorScheme.background,
                onPressed: () {},
            ),
        ),
    ],
),

输出为:

    2015        2016        2017        2018        2019    
Jan 10991273    15761628    20702648    28836397    32462658
Feb 11910590    18407640    21867727    29592821    34120748
Mar 14720817    22353179    28631090    37017871    41731600
Apr 14240928    22383817    28698805    36719286    40352427
May 13999937    22562954    30105567    38492879    42443240
Jun 14618367    23485559    31294015    40219835    42243535
Jul 16954514    22816656    31235203    39633588    41259052
Aug 16384802    22418011    30851292    39153646    38739977
Sep 17546431    22387746    30207602    37501028    37273751
Oct 19069836    24623265    34346016    42694615    0
Nov 15864435    21323086    30132954    34682955    0
Dec 14728914    18795856    26990426    33064396    0

该输出代表这些值的预测吗?

1 个答案:

答案 0 :(得分:1)

我会说不是

未能与Jan-Sep的早期值达成一致是一个不好的信号。

11月份的较大负值表明存在问题。这些数字代表什么?在物理上可能会出现负值吗?

将功能像黑匣子一样对待是一个错误。

我可以用不同的方式查看这些数据:

  1. 每月适合一次,其中年份是输入值。
  2. 每年一次,总计12个值。
  3. 以月,年为参数的二维表面。

你在做什么?您假设适合什么顺序?

您应该能够计算SSE并找出适合不同方案的优势。

我强烈建议您先绘制数据并仔细检查,然后再尝试拟合任何内容。更好地理解数据。