好文档 - 专业文书写作范文服务资料分享网站

Quiz 2 - 图文

天下 分享 时间: 加入收藏 我要投稿 点赞

Problem 1

Consider the simplified logistic regression with one variable (without intercept)???

Hypothesis: ?????????=????(????????)=

????1Cost Function: ????????=?????=1?????????log??????????????

????

????????1Gradients: ????????=?????=1?????????(????)?????(????)????(????)

????????????

11+?????????x????

1?????

log(1??????(????(????)))

Please solve the following problem:

1.Suppose initially ????=0.5, for a test sample ????=2, please calculate ????(????=

1|????=2;????=0.5)

2.Please perform one iteration of gradient descent using the following training data with initial ????=0.5and learning rate as ????=2. What’s the new ?????

????????103. Please recalculate ????(????=1|????=2;????)using the new ????you get from 2

4. Please compare the cost function before and after the gradient descent. Does it decrease?

SocialMediaMiningMachine Learning for Data Analytics0101

2????

Measures andMetricsQuiz 11

Problem 1

Consider the simplified logistic regression (without intercept)???

Hypothesis: ?????????=????(????????)=

????1Cost Function: ????????=?????=1?????????log??????????????

????????????1Gradients: ????????=?????=1?????????(????)?????(????)????(????)

????????????

11+?????????x????

1?????

log(1??????(????(????)))

Please solve the following problem:

1.Suppose initially ????=0.5, for a test sample ????=2, please calculate ????(????=

1|????=2;????=0.5)

11????????=1????=2;????=0.5=?????????===0.73?0.5×2?11+????1+????SocialMediaMiningMachine Learning for Data AnalyticsMeasures andMetricsQuiz 12

Problem 1

Consider the simplified logistic regression (without intercept)??

Hypothesis: ?????????=????(????1????1)=????Gradients: ????

????????????

????1?????=1????

11+?????????x2. Please perform one iteration of gradient descent using the following training data with initial ????=0.5and learning rate as ????=2. What’s the new ?????

????01????

????=

?????????(????)?????(????)????(????)????1001

2????

????11(????)(????)(????)

?????????????????=??????????=[?????0?1×0+?????1?0×1]

????????????211=?0×1=0.311?0.521+????????????????????????=1SocialMediaMiningMachine Learning for Data Analytics????=?????????????=0.5?2?0.311=?0.122Measures andMetricsQuiz 13

Problem 1

Consider the simplified logistic regression (without intercept)??

Hypothesis: ?????????=????(????1????1)=????Gradients: ????

????????????

????1?????=1????

11+?????????x3. Please recalculate ????(????=1|????=2;????)using the new ????you get from 2

11==0.4390.2441+????????=

?????????(????)?????(????)????(????)

????????=1????=2;????=?0.122=?????????=?

?

Initially, ????=0.5, we have ????????=1????=2;????=0.5=0.73, predict as 1After one integration of gradient descent, ????=?0.122, and ????????=1????=2;????=?0.122=0.439, predict as 0

0

1

2

????

4

1+????0.122×2SocialMediaMiningMachine Learning for Data AnalyticsMeasures andMetricsQuiz 1Problem 1

Consider the simplified logistic regression (without intercept)??

Hypothesis: ?????????=????(????????)=Cost Function: ????????=

????1?????=1?????????????

11+?????????x????

????

4. Please compare the cost function before and after the gradient descent. Does it decrease?When ????=0.5

11????0.5=?log?????0?1?1log1??????0+[?0×log?????1?1?0log(1??????(1))]

2211111)=0.362=?log?????0?log(1??????(1))=?log0.5?log(1??0.5221+????22log??????????1?????

log(1??????(????(????)))

11111)=0.288?????0.122=?log?????0?log(1??????(1))=?log0.5?log(1?0.122221+????22When ????=?0.122

????01????10SocialMediaMiningMachine Learning for Data AnalyticsMeasures andMetricsQuiz 15

Quiz 2 - 图文

Problem1Considerthesimplifiedlogisticregressionwithonevariable(withoutintercept)???Hypothesis:?????????=????(????????)=????1CostFunction:????????=?????=1?????????l
推荐度:
点击下载文档文档为doc格式
5b6we0xv1b1x2cx44e354ncj33s2bw019r2
领取福利

微信扫码领取福利

微信扫码分享