{"id":21188333,"url":"https://github.com/raphsenn/logistic-regression-model-py","last_synced_at":"2025-07-25T22:12:06.716Z","repository":{"id":243844860,"uuid":"813547067","full_name":"raphsenn/logistic-regression-model-py","owner":"raphsenn","description":"Simple logistic regression model using raw python and numpy.","archived":false,"fork":false,"pushed_at":"2024-09-27T07:30:49.000Z","size":188,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T13:09:53.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphsenn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-11T09:33:45.000Z","updated_at":"2024-09-27T07:30:52.000Z","dependencies_parsed_at":"2024-11-22T21:01:16.683Z","dependency_job_id":null,"html_url":"https://github.com/raphsenn/logistic-regression-model-py","commit_stats":null,"previous_names":["raphsenn/logistic-regression-model-py"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphsenn%2Flogistic-regression-model-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphsenn%2Flogistic-regression-model-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphsenn%2Flogistic-regression-model-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphsenn%2Flogistic-regression-model-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphsenn","download_url":"https://codeload.github.com/raphsenn/logistic-regression-model-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243640859,"owners_count":20323731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T18:44:28.222Z","updated_at":"2025-03-14T20:25:05.526Z","avatar_url":"https://github.com/raphsenn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logistic-regression-model-py\nSimple logistic regression model using raw python and numpy.\n\n## Logistic Regression in a nutshell.\n\n![image](./res/logisticregressio.jpg)\n\n### Forward propagation\nFor one training example $x = (x_1, ..., x_n)$ of dimension n, the forward propgation is:\n\n$z = dot(w, x) + b$\n\n$a = sigmoid(z)$\n\n$L = -(ylog(a) + (1-y)log(1-a))$\n\n### Backpropagation\nTraining the model means updating the weights and biases, W and b, using the gradient of the\nloss with respect to these parameters.\n\nAt each step, we need to calcualate: \n\n####  $\\frac{dL}{dw} $, $ \\frac{dL}{db}$\n\nWe can use the cain rule:\n\n#### Chain rule\n\nLet $u(x)$ and $v(x)$ be two function.\n\nWe want the derivative of the product of u and v:\n\n$\\frac{dvu}{dx} $ = $\\frac{dv}{dx} u + \\frac{du}{dx} $ v\n\nin another notation:\n\n$(v(x)*u(x))'$ = $v'(x) * u(x) + v(x) * u'(x)$","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphsenn%2Flogistic-regression-model-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphsenn%2Flogistic-regression-model-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphsenn%2Flogistic-regression-model-py/lists"}