小编Tee*_*eng的帖子

TestDome 数据科学:没有得到正确答案

我尝试从 TestDome 回答这个问题并得到 250877.19298245612 而不是建议的 250000 。请告诉我出了什么问题。谢谢

import numpy as np
from sklearn import linear_model

class MarketingCosts:

    # param marketing_expenditure list. Expenditure for each previous campaign.
    # param units_sold list. The number of units sold for each previous campaign.
    # param desired_units_sold int. Target number of units to sell in the new campaign.
    # returns float. Required amount of money to be invested.
    @staticmethod
    def desired_marketing_expenditure(marketing_expenditure, units_sold, desired_units_sold):
        X = [[i] for i in units_sold]
        reg = linear_model.LinearRegression() …
Run Code Online (Sandbox Code Playgroud)

python python-3.x scikit-learn

5
推荐指数
1
解决办法
4704
查看次数

标签 统计

python ×1

python-3.x ×1

scikit-learn ×1