xlearn 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/NOTICE.txt +1 -0
- data/README.md +11 -5
- data/lib/xlearn/dmatrix.rb +7 -0
- data/lib/xlearn/model.rb +2 -0
- data/lib/xlearn/version.rb +1 -1
- data/vendor/NOTICE +108 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db5aa58044f0c7a4b39541599ac60363e32db0ef0583ea5ab2d200b5d355228d
|
4
|
+
data.tar.gz: 6d43254012b3ccf9a2ff23cceeff218e5260970d900d6b5634f122aa6c9b0127
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c539cdce4f80deab0306e45b32ed27a98d5e6e90151b7c8d1af4e06d90ed96c404b86beefd79b0d7018b757c2fcee5bf739fd6632dd0fc5baf12a30c5ac94c3b
|
7
|
+
data.tar.gz: 6b93fea811923b106daf660a0dd876ba1e79fcd525c6f8caca4fc1c83ca835caf60644e4db974a09a6bffc0718dcd0d8a41798745eeee818685ddd58d6bd89b4
|
data/CHANGELOG.md
CHANGED
data/NOTICE.txt
CHANGED
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Supports:
|
|
8
8
|
- Factorization machines
|
9
9
|
- Field-aware factorization machines
|
10
10
|
|
11
|
-
[![Build Status](https://travis-ci.org/ankane/xlearn.svg?branch=master)](https://travis-ci.org/ankane/xlearn)
|
11
|
+
[![Build Status](https://travis-ci.org/ankane/xlearn.svg?branch=master)](https://travis-ci.org/ankane/xlearn) [![Build status](https://ci.appveyor.com/api/projects/status/r7upg4073w7xct35/branch/master?svg=true)](https://ci.appveyor.com/project/ankane/xlearn/branch/master)
|
12
12
|
|
13
13
|
## Installation
|
14
14
|
|
@@ -129,16 +129,22 @@ Data can be an array of arrays
|
|
129
129
|
[[1, 2, 3], [4, 5, 6]]
|
130
130
|
```
|
131
131
|
|
132
|
-
Or a
|
132
|
+
Or a Numo array
|
133
133
|
|
134
134
|
```ruby
|
135
|
-
|
135
|
+
Numo::NArray.cast([[1, 2, 3], [4, 5, 6]])
|
136
|
+
```
|
137
|
+
|
138
|
+
Or a Rover data frame
|
139
|
+
|
140
|
+
```ruby
|
141
|
+
Rover.read_csv("houses.csv")
|
136
142
|
```
|
137
143
|
|
138
|
-
Or a
|
144
|
+
Or a Daru data frame
|
139
145
|
|
140
146
|
```ruby
|
141
|
-
|
147
|
+
Daru::DataFrame.from_csv("houses.csv")
|
142
148
|
```
|
143
149
|
|
144
150
|
## Performance
|
data/lib/xlearn/dmatrix.rb
CHANGED
@@ -12,6 +12,9 @@ module XLearn
|
|
12
12
|
elsif daru?(data)
|
13
13
|
nrow, ncol = data.shape
|
14
14
|
flat_data = data.map_rows(&:to_a).flatten
|
15
|
+
elsif rover?(data)
|
16
|
+
nrow, ncol = data.shape
|
17
|
+
flat_data = data.each_row.map(&:values).flatten
|
15
18
|
elsif narray?(data)
|
16
19
|
nrow, ncol = data.shape
|
17
20
|
# TODO convert to SFloat and pass pointer
|
@@ -61,5 +64,9 @@ module XLearn
|
|
61
64
|
def narray?(data)
|
62
65
|
defined?(Numo::NArray) && data.is_a?(Numo::NArray)
|
63
66
|
end
|
67
|
+
|
68
|
+
def rover?(data)
|
69
|
+
defined?(Rover::DataFrame) && data.is_a?(Rover::DataFrame)
|
70
|
+
end
|
64
71
|
end
|
65
72
|
end
|
data/lib/xlearn/model.rb
CHANGED
data/lib/xlearn/version.rb
CHANGED
data/vendor/NOTICE
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
Copyright XLearn contributors
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
14
|
+
|
15
|
+
---
|
16
|
+
|
17
|
+
Copyright (C) 2011 Paul Mineiro
|
18
|
+
All rights reserved.
|
19
|
+
|
20
|
+
Redistribution and use in source and binary forms, with
|
21
|
+
or without modification, are permitted provided that the
|
22
|
+
following conditions are met:
|
23
|
+
|
24
|
+
* Redistributions of source code must retain the
|
25
|
+
above copyright notice, this list of conditions and
|
26
|
+
the following disclaimer.
|
27
|
+
|
28
|
+
* Redistributions in binary form must reproduce the
|
29
|
+
above copyright notice, this list of conditions and
|
30
|
+
the following disclaimer in the documentation and/or
|
31
|
+
other materials provided with the distribution.
|
32
|
+
|
33
|
+
* Neither the name of Paul Mineiro nor the names
|
34
|
+
of other contributors may be used to endorse or promote
|
35
|
+
products derived from this software without specific
|
36
|
+
prior written permission.
|
37
|
+
|
38
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
39
|
+
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
40
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
41
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
42
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
43
|
+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
44
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
45
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
46
|
+
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
47
|
+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
48
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
49
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
50
|
+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
51
|
+
POSSIBILITY OF SUCH DAMAGE.
|
52
|
+
|
53
|
+
Contact: Paul Mineiro <paul@mineiro.com>
|
54
|
+
|
55
|
+
---
|
56
|
+
|
57
|
+
Copyright 2011 Martin T. Sandsmark <sandsmark@samfundet.no>
|
58
|
+
Redistribution and use in source and binary forms, with or without
|
59
|
+
modification, are permitted provided that the following conditions
|
60
|
+
are met:
|
61
|
+
1. Redistributions of source code must retain the above copyright
|
62
|
+
notice, this list of conditions and the following disclaimer.
|
63
|
+
2. Redistributions in binary form must reproduce the above copyright
|
64
|
+
notice, this list of conditions and the following disclaimer in the
|
65
|
+
documentation and/or other materials provided with the distribution.
|
66
|
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
67
|
+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
68
|
+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
69
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
70
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
71
|
+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
72
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
73
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
74
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
75
|
+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
76
|
+
|
77
|
+
---
|
78
|
+
|
79
|
+
Protocol Buffers - Google's data interchange format
|
80
|
+
|
81
|
+
Copyright 2008 Google Inc. All rights reserved.
|
82
|
+
https://developers.google.com/protocol-buffers/
|
83
|
+
|
84
|
+
Redistribution and use in source and binary forms, with or without
|
85
|
+
modification, are permitted provided that the following conditions are
|
86
|
+
met:
|
87
|
+
|
88
|
+
* Redistributions of source code must retain the above copyright
|
89
|
+
notice, this list of conditions and the following disclaimer.
|
90
|
+
* Redistributions in binary form must reproduce the above
|
91
|
+
copyright notice, this list of conditions and the following disclaimer
|
92
|
+
in the documentation and/or other materials provided with the
|
93
|
+
distribution.
|
94
|
+
* Neither the name of Google Inc. nor the names of its
|
95
|
+
contributors may be used to endorse or promote products derived from
|
96
|
+
this software without specific prior written permission.
|
97
|
+
|
98
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
99
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
100
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
101
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
102
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
103
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
104
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
105
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
106
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
107
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
108
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xlearn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rover-df
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description:
|
98
112
|
email: andrew@chartkick.com
|
99
113
|
executables: []
|
@@ -114,6 +128,7 @@ files:
|
|
114
128
|
- lib/xlearn/utils.rb
|
115
129
|
- lib/xlearn/version.rb
|
116
130
|
- vendor/LICENSE
|
131
|
+
- vendor/NOTICE
|
117
132
|
- vendor/libxlearn_api.dylib
|
118
133
|
- vendor/libxlearn_api.so
|
119
134
|
- vendor/xlearn_api.dll
|