[Machine Learning] Cost Function for Logistic Regression Model
We cannot use the same cost function that we use for linear regression because the Logistic Function will cause the output to be wavy, causing many local optima. In other words, it will not be a convex function.
non-convex:
convex:
Instead, our cost function for logistic regression looks like:
If our correct answer 'y' is 0, then the cost function will be 0 if our hypothesis function also outputs 0. If our hypothesis approaches 1, then the cost function will approach infinity.
If our correct answer 'y' is 1, then the cost function will be 0 if our hypothesis function outputs 1. If our hypothesis approaches 0, then the cost function will approach infinity.
Note that writing the cost function in this way guarantees that J(θ) is convex for logistic regression.
相关文章
- ISO镜像文件制作工具AnyToISO Pro for Mac
- AlDente for Mac(mac电池最大充电限制工具)
- Symantec Endpoint Protection for mac(病毒安全防护软件)
- ORA-01251: Unknown File Header Version read for file number string ORACLE 报错 故障修复 远程处理
- ORA-19779: could not obtain resilvering status for change tracking file ORACLE 报错 故障修复 远程处理
- ORA-28004: invalid argument for function specified in PASSWORD_VERIFY_FUNCTION string ORACLE 报错 故障修复 远程处理
- ORA-30357: this PL/SQL function cannot be supported for query rewrite ORACLE 报错 故障修复 远程处理
- ORA-31604: invalid string parameter “string” for object type string in function string ORACLE 报错 故障修复 远程处理
- ORA-31600: invalid input value string for parameter string in function string ORACLE 报错 故障修复 远程处理
- ORA-39808: The SINGLEROW option must be specified for parent table string. ORACLE 报错 故障修复 远程处理
- ORA-41638: invalid attribute for “string” element in rule condition ORACLE 报错 故障修复 远程处理
- ORA-55360: invalid value for resource position – string ORACLE 报错 故障修复 远程处理
- ORA-64128: XMLIndex Table Function: failure during the function evaluation ORACLE 报错 故障修复 远程处理
- MySQL Error number: MY-010221; Symbol: ER_UDF_CANT_ALLOC_FOR_FUNCTION; SQLSTATE: HY000 报错 故障修复 远程处理
- MySQL Error number: MY-010572; Symbol: ER_RPL_MTS_GROUP_RECOVERY_RELAY_LOG_INFO_FOR_WORKER; SQLSTATE: HY000 报错 故障修复 远程处理
- redis for windows 6.2.6安装包最新步骤详解
- PostgreSQL 22016: invalid_argument_for_nth_value_function 报错 故障修复 远程处理
- PostgreSQL 2201G: invalid_argument_for_width_bucket_function 报错 故障修复 远程处理
- javascript for…in 和 for of区别详解编程语言
- MySQL存储过程中使用FOR循环的实现(mysql存储过程for循环)
- Unlocking the Power of Oracle: A Guide for Beginners(oracle英文)
- databaseMerging MSSQL Databases for Improved Performance(mergemssql)
- Reviving the Classic: CS 1.6 Now Available on Linux for Gamers Everywhere(cs1.6linux)
- Mastering the power of MySQL for efficient data management.(mysql写一句话)
- Linux下如何优雅地使用For循环(linux下for循环)
- 循环Oracle环境下使用For循环的指南(oracle中使用for)
- Java利用for循环输出空心菱形的实例代码