https://github.com/redislabs/jedis-ml
Add Redis-ML commands to Jedis
https://github.com/redislabs/jedis-ml
Last synced: about 1 year ago
JSON representation
Add Redis-ML commands to Jedis
- Host: GitHub
- URL: https://github.com/redislabs/jedis-ml
- Owner: RedisLabs
- License: agpl-3.0
- Created: 2016-10-05T16:06:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-22T07:04:19.000Z (about 7 years ago)
- Last Synced: 2025-04-06T17:03:32.319Z (about 1 year ago)
- Language: Java
- Homepage: http://redisml.io
- Size: 16.6 KB
- Stars: 6
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
#### Notice RedisML is planned to be replaced by [RedisAI](http://redisai.io), adding support for deep learning.
***
# jedis-ml
### Add [Redis-ML](https://github.com/RedisLabsModules/redis-ml "Redis-ML") commands to [Jedis](https://github.com/xetorthio/jedis "Jedis")
## Installation:
```sh
#get and build jedis
git clone https://github.com/xetorthio/jedis.git
cd jedis
mvn package -Dmaven.test.skip=true
#get and build jedis-ml
cd..
git clone https://github.com/RedisLabs/jedis-ml.git
cd jedis-ml
cp ../jedis/target/jedis-3.0.0-SNAPSHOT.jar lib/
mvn install
```
### Usage:
add jedis-ml/target/jedis-ml-1.0-SNAPSHOT.jar to the classpath.
Scala example (create a forest):
```scala
import com.redislabs.client.redisml.MLClient
import redis.clients.jedis.{Jedis, _}
val jedis = new Jedis("localhost")
val cmdArr = Array("my_forest","0",".","numeric","1","0.7")
jedis.getClient.sendCommand(MLClient.ModuleCommand.FOREST_ADD, cmdArr: _*)
jedis.getClient().getStatusCodeReply
```
### Command list:
FOREST_ADD
FOREST_RUN
FOREST_TEST
LINREG_SET
LINREG_PREDICT
LOGREG_SET
LOGREG_PREDICT
MATRIX_SET
MATRIX_MULTIPLY
MATRIX_ADD
MATRIX_SCALE
MATRIX_PRINT
MATRIX_TEST