GPG and Maven, JDK 7 is mandatory for verification
brew install gpg gpg-agent pinentry-mac
brew install maven
brew install md5sha1sum
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
# | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
# | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
use movielens;
select max(movieid) from ratings;
> 3952
-- list popular items
WITH t as (
select
movieid as itemid,
package puzzle; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
import javax.annotation.CheckForNull; | |
import javax.annotation.Nonnull; | |
import javax.annotation.Nullable; | |
import com.google.common.base.Preconditions; |
create table model
as
select
feature,
voted_avg(weight) as weight
from
(select
-- hinge loss by the default
train_classifier(add_bias(features),label,'-iter 20') as (feature,weight)
https://en.wikipedia.org/wiki/Okapi_BM25
create or replace view doc_len
as
select
docid, count(1) as cnt
from