Skip to content

Commit

Permalink
Change the way binary classifiers are decoded in elasticc (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPeloton authored Oct 4, 2022
1 parent 986fc4e commit 2488c04
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions bin/distribute_elasticc.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,26 @@ def format_df_to_elasticc(df):
'classifications',
F.array(
F.struct(
F.lit('AGN classifier version 1.0'),
F.lit('Probability to be an AGN based on a Random Forest classifier'),
F.lit('AGN classifier'),
F.lit('version 1.0'),
F.col("classes").getItem(0),
F.col("scores").getItem(0)
),
F.struct(
F.lit('AGN classifier version 1.0'),
F.lit('Probability to NOT be an AGN based on a Random Forest classifier'),
F.lit('AGN classifier'),
F.lit('version 1.0'),
F.col("classes").getItem(1),
F.col("scores").getItem(1)
),
F.struct(
F.lit('SuperNNova SN Ia classifier version 1.0'),
F.lit('Probability to be a SN Ia based on SuperNNova'),
F.lit('SuperNNova SN Ia classifier'),
F.lit('version 1.0'),
F.col("classes").getItem(2),
F.col("scores").getItem(2)
),
F.struct(
F.lit('SuperNNova SN Ia classifier version 1.0'),
F.lit('Probability to NOT be a SN Ia based on SuperNNova'),
F.lit('SuperNNova SN Ia classifier'),
F.lit('version 1.0'),
F.col("classes").getItem(3),
F.col("scores").getItem(3)
),
Expand All @@ -145,14 +145,14 @@ def format_df_to_elasticc(df):
F.col("scores").getItem(6)
),
F.struct(
F.lit('EarlySN classifier version 1.0'),
F.lit('Probability to be an early SN Ia based on a Random Forest classifier'),
F.lit('EarlySN classifier'),
F.lit('version 1.0'),
F.col("classes").getItem(7),
F.col("scores").getItem(7)
),
F.struct(
F.lit('EarlySN classifier version 1.0'),
F.lit('Probability to NOT be an early SN Ia based on a Random Forest classifier'),
F.lit('EarlySN classifier'),
F.lit('version 1.0'),
F.col("classes").getItem(8),
F.col("scores").getItem(8)
),
Expand Down
2 changes: 1 addition & 1 deletion fink_broker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = "2.4"
__version__ = "2.5"

0 comments on commit 2488c04

Please sign in to comment.