{"id":17151109,"url":"https://github.com/nvinuesa/sparsal","last_synced_at":"2025-04-13T12:10:10.358Z","repository":{"id":57723777,"uuid":"78238896","full_name":"nvinuesa/sparsal","owner":"nvinuesa","description":"Sparse approximation library","archived":false,"fork":false,"pushed_at":"2017-05-14T18:32:59.000Z","size":23,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T12:10:01.891Z","etag":null,"topics":["scala","signal-processing","sparse","sparse-coding"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/nvinuesa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-06T21:07:34.000Z","updated_at":"2023-08-07T19:33:25.000Z","dependencies_parsed_at":"2022-08-25T10:52:10.931Z","dependency_job_id":null,"html_url":"https://github.com/nvinuesa/sparsal","commit_stats":null,"previous_names":["underscorenico/sparsal"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvinuesa%2Fsparsal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvinuesa%2Fsparsal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvinuesa%2Fsparsal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvinuesa%2Fsparsal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nvinuesa","download_url":"https://codeload.github.com/nvinuesa/sparsal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710445,"owners_count":21149190,"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":["scala","signal-processing","sparse","sparse-coding"],"created_at":"2024-10-14T21:37:16.508Z","updated_at":"2025-04-13T12:10:10.331Z","avatar_url":"https://github.com/nvinuesa.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"## sparsal - Sparse Approximation Library\n\n[![Build Status](https://travis-ci.org/underscorenico/sparsal.svg?branch=master)](https://travis-ci.org/underscorenico/sparsal)\n[![codecov](https://codecov.io/gh/underscorenico/sparsal/branch/master/graph/badge.svg)](https://codecov.io/gh/underscorenico/sparsal)\n[![Chat](https://badges.gitter.im/sparsal/Lobby.svg)](https://gitter.im/sparsal/Lobby)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/underscorenico/sparsal/master/LICENSE.txt)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.underscorenico/sparsal_2.12.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.underscorenico/sparsal_2.12)\n\n## Overview\n\nThe Sparse Approximation Library aims to provide easy-to-read, modern and maintainable sparse approximation algorithms written in a functional style.\n\u003cbr\u003e\nAt the moment only [the matching pursuit algorithm][mp] is implemented. Future versions will increment the number of algorithms.\n\u003cbr\u003e\nCheck [this article][blog] for some basic theoretical background.\n\n[blog]: https://underscorenico.github.io/blog/2017/01/14/about-sparsal\n[mp]: https://en.wikipedia.org/wiki/Matching_pursuit\n\n## Using sparsal\n\nBuilds are available for scala 2.10.x, 2.11.x and 2.12.2.\n\n### SBT\n\nSimply add sparsal's dependency to your build.sbt if you don't know which version of scala you are using and sbt will automatically detect and search for the appropriate package:\n```scala\nlibraryDependencies += \"com.github.underscorenico\" %% \"sparsal\" % \"0.2.0\"\n```\nOr either specify the desired target version:\n```scala\nlibraryDependencies += \"com.github.underscorenico\" % \"sparsal_2.12\" % \"0.2.0\"\n```\n\n### Maven\n\nIf you are using Maven, simply add sparsal to your dependencies to your pom.xml:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.underscorenico\u003c/groupId\u003e\n    \u003cartifactId\u003esparsal_2.12\u003c/artifactId\u003e\n    \u003cversion\u003e0.2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n### Try it\n\nFirst initialize your MatchingPursuit (or Orthogonal Matching Pursuit) object with an input and a defined dictionary:\n```scala\nval input = Array.fill(10)(5)\n\nval dictionary = Gabor(input.length)\n\nval mp =  MatchingPursuit1D(input, dictionary)\n```\nThen recover the approximation (after the algorithm converges to a certain provided accuracy measure):\n```scala\n    val result: (List[(Double, Int)], Seq[Double]) = mp.run(SNR(20.0))\n```\nThe result will contain a list of selected atoms from the dictionary. The first element of the touple (type Double) will contain the inner product between the input at Iteration n-1 and the selected atom. \n\u003cbr\u003e\nThe second element contains the index of the atom from the dictionary.\n\n## Contributing\n\nEveryone is welcome to contribute, either by adding features, solving bugs or helping with documentation.\n\u003cbr\u003e\nSparsal embraces [the open code of conduct][codeofconduct] from the [TODO group][todogroup], therefore all of its channels should respect its guidelines.\n\u003cbr\u003e\nThat being said, we are a community and we should not need guidelines for our conduct but leave it to our common sense instead.\n\n[codeofconduct]: http://todogroup.org/opencodeofconduct\n[todogroup]: http://todogroup.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvinuesa%2Fsparsal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvinuesa%2Fsparsal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvinuesa%2Fsparsal/lists"}